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