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