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


x = 10
if x > 5:
    print("Greater")

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