Level 10 : What is the average value of the following Python code snippet?


grade1 = 80
grade2 = 90
average = (grade1 + grade2) / 2

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