Level 3 : What will be the output for the below python program?


num = 7
output = "Greater than 0" if num > 0 else "Smaller than 0"
print(output)

Author: KaivalyaG | Tags: conditional-statement | 1736+ Python FAQs | Share
return-statement | list-mutation | sys | lambda | data-structure | data-structure | multiple-inheritance | update | operator-and | with-statement | random-function | nested-loop | parameter | mathematical-function | __init_subclass__ | type_conversion | round-function | sum-function | staticmethod | init | max-min | join | def | complex-number | syntax | name-mangling | python_version | set-operation | class-and-instance-variable | numeric | loops | call | boolean | mysql | functional-programming | arithmetic-expression | matrix | list-comprehension | matrix-list-comprehension | min-max-function | python-history | lambdas | python | built-in-function | encoding | while-else-loop | input-function | tuple | destructor | binary | tuple-unpacking | boolean-and-non-boolean | syntax-error | precedence-and-associativity | function | round | file | comparison | function-argument | python-repl | class | operations | list-slicing | sorting | range | global-variable | file-handling | input | implementation | dictionaries | map-function | file_handling | counter | append | goto-function | python-module | import-method | feature | pickling-&-unpickling | pandas | string-method | identifier | asyncio | encapsulation | expand-tab | conditional-statement | logical-operation | invalid-list | list-method | error-handling | enumerate() | generators | format | namedtuple | assert | syntax-error | floating-point-precision | installation | regular-expression | immutability | object-attribute | list-indexing | generator | copy | namespace | bitwise-operator | file-handling | decimal | string-method | match | postfix | memory | print-statement | id-function | frozenset | yield | class-and-object | loop-control | operator-overloading | generators-in-python | comment | mutable | expression | list-vs-tuple | conversion | mapping-function | int | attribute | comprehension | constructor | math | list | sorted | module | syntaxerror | built-in | filter | global-variable | class-and-inheritance | rollback | basic | sum() | fabs-function | inherit | inheritance | virtual-environment | math-copysign | counter-function | factorial-function | odd-number | data-type | binary-operation | typeerror | compute | loop | control-flow | deep-copy | numpy | stack | operand | string-slicing | escape-operator | interpreter | descriptors | static-method | access-modifier | exponentiation | string-formatting | control-flow | debugging | exception | global | list-operation | split | indexing | __future__ | string-slicing | overflow | integer | variable | random | decorator | slice | conditional-statement | raise | touples | software-design | function-and-scope | async | keyword | shallow-copy | logical-operator | mathematics | exception-handling | version-check | input-function | method | matplotlib | lists | regex | slicing | bitwise-operator | precedence | zfill-function | context-manager | operator | iterable | min-function | operators | string-iteration | array | multithreading | head-and-tail | collection | recursion | while-loop | type-conversion | type-conversion | pep | indentation | threading | datatype | application | package-management | recurssion | data_structure | choice | python-django | objects | magic-method | arithmetic-operation | dicts | functions | string-formatting | print | methods | control-statement | string-concatenation | asyncio-module | data-structures | complex | pseudocode | higher-order-function | library | dictionary | list-join | classes | iterator | swapping | version | gil | data-type | assignment-operator | thread | __all__-attribute | datetime | sys-module | set | exception-handling | multiprocessing | built-in-function | zip-function | collections | virtual-environment | docstring | default-mutable-argument | identity-operator | formal-and-actual-parameter | command-line-parsing | polymorphism | error | list-comprehension | string | while-and-for-loop | operator-or | bitwise | condition | oops | immutable-data-type | string-manipulation | identity-operator | else-statement | scientific-notation | benefit | zip | logical-operator | statement | global-keyword | for | heap-memory | lambda-function | filter-function | oop | design-principle | center | turtle | memory-management ...