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