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