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