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


def f1():
    x=100
    print(x)
x=+1
f1()

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