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


import turtle
t=turtle.Pen()
for i in range(0,4):
	t.forward(100)
	t.left(120)

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