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