@mvaganov/

cuteGraphingExamples2018.1

Python (with Turtle)

No description

fork
loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.6884269286408948","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"IyBhID0gMCAgICAgICAgICAjIGluaXRpYWwgdmFsdWUKIyBsaW1pdCA9IDEwICAgICAjIGxpbWl0CiMgd2hpbGUgYSA8IGxpbWl0OiMgPC0tIGNvbmRpdGlvbgojICAgICBwcmludCgiSXQgaXMgbGVzcyEiKQojICAgICBhICs9IDEgICAgICMgaW5jcmVtZW50IGEgPSBhKzEKIyBwcmludChhKQoKIyB4ID0gaW50KGlucHV0KCJ4IHN0YXJ0IikpCiMgbGltaXQgPSBpbnQoaW5wdXQoInggZW5kIikpCiMgaW1wb3J0IHR1cnRsZQojIHR1cnRsZS5zcGVlZCgwKQojIHR1cnRsZS5wZW51cCgpCiMgcHJpbnQoIiB4IHwgeSIpCiMgcHJpbnQoIi0tLSstLS0iKQojIHdoaWxlIHggPCBsaW1pdDoKIyAgICAgeSA9IDEvNTAuMCAqIHggKiB4ICsgMiAqIHggLSAxMAojICAgICAjcHJpbnQoc3RyKHgpKyIgfCAiK3N0cih5KSkKIyAgICAgcHJpbnQoIiUzZHwlM2QiICUgKHgsIHkpKQojICAgICB0dXJ0bGUuZ290byh4LHkpCiMgICAgIHR1cnRsZS5wZW5kb3duKCkKIyAgICAgeCArPSAxCgppbXBvcnQgdHVydGxlCnR1cnRsZS5zcGVlZCgwKQp4ID0gMApzaXplID0gMzAwCmluY3JlbWVudCA9IDE1CndoaWxlIHggPCBzaXplOgogICAgdHVydGxlLnBlbnVwKCkKICAgIHR1cnRsZS5nb3RvKDAsc2l6ZS14KQogICAgdHVydGxlLnBlbmRvd24oKQogICAgdHVydGxlLmdvdG8oeCwwKQogICAgeCArPSBpbmNyZW1lbnQ="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# a = 0          # initial value
# limit = 10     # limit
# while a < limit:# <-- condition
#     print("It is less!")
#     a += 1     # increment a = a+1
# print(a)

# x = int(input("x start"))
# limit = int(input("x end"))
# import turtle
# turtle.speed(0)
# turtle.penup()
# print(" x | y")
# print("---+---")
# while x < limit:
#     y = 1/50.0 * x * x + 2 * x - 10
#     #print(str(x)+" | "+str(y))
#     print("%3d|%3d" % (x, y))
#     turtle.goto(x,y)
#     turtle.pendown()
#     x += 1

import turtle
turtle.speed(0)
x = 0
size = 300
increment = 15
while x < size:
    turtle.penup()
    turtle.goto(0,size-x)
    turtle.pendown()
    turtle.goto(x,0)
    x += increment
result
console