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