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 | 1859+ Python FAQs | Share
array | filtering-and-indexing | directory-operations | global-variable | id-function | set | decimal | managing-directories-with-os-and-shutil | aggregating-data-with-functools.reduce() | filter | syntax-error | version-check | threading | oop | async | with-statement | logical-operator | anchors-(^,-$) | assignment-operators | matrix | print | type-conversion-and-casting | string-methods | syntax-error | comprehension | multiprocessing | python_version | conditional-statement | string-manipulation | python-history | complex-number | format | string-slicing | multiple-except-blocks | math | error-handling | virtual-environment | copy | dictionary-methods | using-lists-as-stacks | default-mutable-argument | constructor | built-in-function | variable | return-statement | dicts | creating-and-starting-threads | call | list-method | typeerror | lambdas | set-operation | list-vs-tuple | lists | syntax | touples | global-variable | indentation | nested-loop | bitwise-operator | generators | def | input-function | init | generator | software-design | multithreading | exception-handling | data-type-conversions | binary | raise | recursion | multiple-inheritance | encapsulation | file-handling | namespace | matplotlib | rollback | scientific-notation | built-in | goto-function | descriptors | using-map()-for-transformations | control-flow | sorting | introduction-to-python | pandas | creating-custom-modules | data-types | fabs-function | encoding | assignment-operator | list,-set,-and-dictionary-comprehensions | conversion | benefit | regular-expression | statement | shallow-copy | matrix-list-comprehension | append | data-type | enumerate() | round | oops | using-else-and-finally | polymorphism | range | functions | deep-copy | lambda-functions | memory | difference-between-threads-and-processes | filter-function | thread | bitwise | list | list-comprehensions | regular-expressions | loop | conditional-statement | assert | default-arguments | destructor | type-conversion | overflow | datetime | dictionary | class-and-object | list-mutation | data-structures-in-python | arbitrary-arguments-(*args,-**kwargs) | data-type | max-min | join | data-structure | match | for | tuple | staticmethod | basic | min-function | list-indexing | counter | reading:-read(),-readline(),-readlines() | asyncio-module | control-flow | integers | math-copysign | pep | type-conversion | sys-module | gil | boolean-and-non-boolean | pickling--unpickling | import-method | advanced-file-operations | numpy | using-join()-and-is_alive()-methods | while-loop | file_handling | installation | list-comprehension | application | identity-operator | numeric | compute | head-and-tail | sum() | docstring | datatype | attribute | loop-control | indexing | defining-functions | quantifiers-(*,-+,-?,-{}) | floats | precedence | mutable | using-os-and-pathlib-modules | exception-handling | list-operation | counter-function | control-statement | lambda | working-with-file-paths | working-with-dates-and-times | class-and-inheritance | data_structure | walking-through-directories-using-os.walk() | print-statement | strings | mapping-function | min-max-function | __init_subclass__ | exception | precedence-and-associativity | dictionaries | collections | debugging | complex | using-assertions-(assertequal,-assertraises) | loop-control-statements | string-method | sorting-and-ranking | list-methods-and-slicing | list-comprehension | introduction-to-threads | tuple-unpacking | booleans | pseudocode | context-manager | object-attribute | package-management | input-function | sys | methods | functional-programming | datetime.date,-datetime.time,-datetime.datetime | implementation | time-series-with-pandas | class | identity-operator | while-and-for-loop | parameter | library | working-with-temporary-files-using-tempfile | regex | built-in-modules | namedtuple | zip-function | virtual-environment | membership-operators-(in,-not-in) | generators-in-python | operator-and | yield | decorator | zfill-function | __all__-attribute | single-inheritance | operator-or | recurssion | parsing-with-strptime | using-the-threading-module | stack | while-loops | slice | list-slicing | literal-characters-and-special-characters | input | reading-and-writing-large-files-efficiently | loops | command-line-parsing | magic-method | condition | memory-management | bitwise-operator | writing:-write(),-writelines() | lambda-function | identity-operators-(is,-is-not) | turtle | conditional-statements | type_conversion | asyncio | expand-tab | handling-missing-values-(fillna,-dropna) | boolean | multiple-inheritance | function | inherit | dataframe-and-series-objects | key-value-pairs | logical-operators | string | python-operators | dictionary-comprehensions | name-mangling | logical-operation | keyword | expression | working-with-binary-files-(rb,-wb) | operators | center | __future__ | version | map-function | inheritance | functional-programming | logical-operator | zip | random | mathematical-function | operator-overloading | else | round-function | sorted | static-method | introduction-to-multiprocessing | mathematics | data-structures | module | built-in-function | method | string-concatenation | iterable | thread-safe-data-structures-(queue.queue) | collection | method-overloading | string-formatting | integer | tuple-methods | pass | unit-testing | exponentiation | random-function | using-yield-in-functions | data-structure | formal-and-actual-parameter | sets | design-principle | mysql | escape-operator | objects | classes | tuples | why-use-multiprocessing-over-threading?-(gil) | thread-synchronization | global-keyword | operator | postfix | split | string-formatting | test-discovery | update | heap-memory | python-syntax-and-structure | python-repl | intering | string-method | function-argument | int | overriding-methods | while-else-loop | syntaxerror | operations | opening-files-(open()) | swapping | string-iteration | joining-and-merging-dataframes | binary-operation | slicing | class-and-instance-variable | access-modifier | sum-function | reading-and-writing-files | choice | floating-point-precision | string-slicing | arithmetic-expression | odd-number | python-module | operand | indexing:-loc-vs-iloc | comment | interpreter | error | iterator | raise-statement | arithmetic-operation | python | boolean-masking | python-django | higher-order-function | comparison | formatting-with-strftime | global | invalid-list | immutable-data-type | error-handling | immutability | identifier | file-handling | iterators | else-statement | list-join | factorial-function | file | feature | function-and-scope | frozenset | class-decorators ...