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