Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # What will happen if you write without lifting your pen?
- # This code simulates that for each words.
- # I've added colors and offsets for more readability.
- # https://youtu.be/hqTX4vV5bI0
- from turtle import *
- from time import sleep
- sh = setheading
- def a():
- sh(60)
- forward(50)
- sh(-60)
- forward(50)
- sh(0)
- forward(20)
- def b():
- sh(-90)
- forward(60)
- sh(0)
- circle(-15, 180)
- sh(0)
- circle(-15, 180)
- def c():
- sh(180)
- circle(30, 180)
- def d():
- sh(-90)
- forward(60)
- sh(0)
- circle(-30, 180)
- def e():
- sh(0)
- forward(30)
- sh(-90)
- forward(60)
- sh(0)
- forward(30)
- dot(5)
- forward(30)
- def f():
- sh(0)
- forward(30)
- sh(-90)
- forward(60)
- sh(0)
- forward(30)
- def g():
- sh(180)
- circle(30, 180)
- sh(90)
- forward(30)
- sh(0)
- forward(15)
- def h():
- sh(-90)
- forward(60)
- sh(0)
- forward(30)
- sh(-90)
- forward(60)
- def i():
- sh(0)
- forward(30)
- sh(-90)
- forward(60)
- sh(0)
- forward(30)
- def j():
- sh(0)
- forward(30)
- sh(-90)
- forward(30)
- circle(-7, 180)
- def k():
- sh(-90)
- forward(60)
- sh(-120)
- forward(30)
- sh(-60)
- forward(30)
- def l():
- sh(-90)
- forward(60)
- sh(0)
- forward(30)
- def m():
- sh(-90)
- forward(60)
- sh(-60)
- forward(30)
- sh(60)
- forward(30)
- sh(-90)
- forward(60)
- def n():
- sh(-90)
- forward(60)
- sh(-50)
- forward(70)
- sh(90)
- forward(60)
- def o():
- sh(90)
- circle(-20)
- def p():
- sh(-90)
- forward(60)
- sh(0)
- circle(-15, 180)
- def q():
- sh(90)
- circle(-20)
- sh(-45)
- forward(20)
- def r():
- sh(-90)
- forward(60)
- sh(0)
- circle(-20, 180)
- sh(-45)
- forward(30)
- def s():
- sh(180)
- circle(15, 180)
- circle(-15, 180)
- def t():
- sh(0)
- forward(30)
- sh(-90)
- forward(60)
- def u():
- sh(-90)
- forward(30)
- circle(15, 180)
- forward(30)
- def v():
- sh(-70)
- forward(50)
- sh(70)
- forward(50)
- def w():
- sh(-80)
- forward(50)
- sh(80)
- forward(50)
- sh(-80)
- forward(50)
- sh(80)
- forward(50)
- def x():
- sh(-30-90)
- forward(40)
- sh(-(90-30))
- forward(40)
- def y():
- sh(-45)
- forward(20)
- sh(-45-90)
- forward(20)
- sh(-90)
- forward(30)
- def z():
- sh(0)
- forward(30)
- sh(-90-35)
- forward(50)
- sh(0)
- forward(30)
- dot(5)
- forward(20)
- def _():
- sleep(1)
- clear()
- pu()
- setpos(-320, 320)
- pd()
- screensize(1000, 1000)
- speed(0)
- width(2)
- pu()
- setpos(-320, 320)
- pd()
- colors = ('red', 'blue')
- text = " Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
- for num, char in enumerate(text):
- color(colors[num%2])
- char = char.lower()
- try:
- globals()[char]()
- except:
- _();
- color('lime')
- sh(-45)
- forward(5)
- sleep(0.1)
- done()
- exit()
Add Comment
Please, Sign In to add comment