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


num = 10

if num > 0:
    print("Positive number")
elif num == 0:
    print("Zero")
else:
    print("Negative number")

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