Level 1 : What will be the output of the following Python code?


def printMax(a, b):
    if a > b:
        print(a, 'is maximum')
    elif a == b:
        print(a, 'is equal to', b)
    else:
        print(b, 'is maximum')
printMax(3, 4)

Author: SandhyaR | Tags: conditional-statement | 1736+ Python FAQs | Share
methods | operators | pickling-&-unpickling | pep | random | syntax | memory | data-type | oops | arithmetic-expression | virtual-environment | sorting | tuple | lambdas | comparison | call | installation | identity-operator | classes | set | thread | return-statement | constructor | input-function | array | basic | decimal | data-structure | type-conversion | attribute | list-slicing | string | benefit | round | docstring | gil | formal-and-actual-parameter | max-min | global-variable | while-else-loop | iterator | zip-function | threading | logical-operation | conditional-statement | overflow | asyncio-module | encapsulation | assignment-operator | boolean-and-non-boolean | exception-handling | scientific-notation | data_structure | string-formatting | pseudocode | else-statement | copy | filter | feature | string-slicing | version-check | type-conversion | binary | invalid-list | file_handling | id-function | math | while-loop | indexing | namespace | magic-method | logical-operator | built-in | typeerror | function-and-scope | __future__ | descriptors | floating-point-precision | list-indexing | design-principle | class-and-inheritance | odd-number | input | oop | global-variable | bitwise-operator | list-comprehension | min-function | parameter | list-join | access-modifier | data-structures | syntax-error | statement | input-function | functional-programming | matrix-list-comprehension | frozenset | python-repl | function-argument | __all__-attribute | mapping-function | slicing | center | loop-control | update | asyncio | python | yield | python_version | nested-loop | exception-handling | list-method | append | init | exponentiation | string-manipulation | format | built-in-function | dicts | operator-and | pandas | zip | boolean | higher-order-function | logical-operator | built-in-function | set-operation | loop | recursion | round-function | lists | zfill-function | mathematical-function | python-module | datatype | counter-function | turtle | list-comprehension | sorted | while-and-for-loop | counter | print | expression | type_conversion | encoding | class-and-instance-variable | list-mutation | string-slicing | global | data-structure | multiprocessing | precedence | string-formatting | recurssion | string-iteration | choice | dictionary | sys-module | integer | function | comprehension | int | for | comment | range | list | version | fabs-function | inheritance | conditional-statement | control-flow | command-line-parsing | lambda-function | python-django | operations | complex | software-design | tuple-unpacking | sum() | list-vs-tuple | indentation | heap-memory | variable | control-statement | file-handling | random-function | join | expand-tab | string-method | bitwise | inherit | map-function | def | iterable | name-mangling | immutability | immutable-data-type | filter-function | head-and-tail | lambda | identifier | context-manager | stack | rollback | match | multithreading | operand | slice | split | arithmetic-operation | __init_subclass__ | static-method | syntaxerror | module | numeric | keyword | compute | dictionaries | datetime | generators | functions | touples | import-method | assert | sys | object-attribute | binary-operation | method | postfix | objects | operator | conversion | precedence-and-associativity | application | sum-function | matrix | goto-function | implementation | syntax-error | loops | destructor | numpy | shallow-copy | package-management | operator-overloading | error-handling | namedtuple | file-handling | string-method | list-operation | condition | error | bitwise-operator | control-flow | collections | decorator | class-and-object | class | complex-number | generators-in-python | default-mutable-argument | regular-expression | library | virtual-environment | debugging | regex | staticmethod | collection | mysql | matplotlib | mutable | math-copysign | factorial-function | with-statement | identity-operator | global-keyword | mathematics | escape-operator | print-statement | min-max-function | async | enumerate() | swapping | multiple-inheritance | interpreter | data-type | polymorphism | operator-or | string-concatenation | raise | deep-copy | exception | python-history | generator | memory-management | file ...