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