Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Challenge 2
- import turtle
- elena = turtle.Turtle()
- elena.penup()
- def line(words, horiz_pos = -20):
- x,y = elena.pos()
- elena.goto(max(horiz_pos, -40), y)
- elena.write(words)
- x,y = elena.pos()
- elena.goto(x, y -20)
- def by():
- elena.color('white')
- x,y = elena.pos()
- elena.goto(x + 70, max( -100, y -30))
- elena.write()
- x,y = elena.pos()
- elena.goto(0, y)
- name = input("Write down the name of the person you are going to congratulate: ")
- return name
- name = by()
- elena.color('indigo')
- elena.goto(-50, 150)
- line("Happy Birthday to You,")
- line("Happy Birthday to You")
- line("Happy Birthday Dear " + name)
- line("Happy Birthday to You.")
- elena.color('magenta')
- elena.goto(-50, 50)
- line("From good friends and true,")
- line("From old friends and new,")
- line("May good luck go with you,")
- line("And happiness too.")
Advertisement
Add Comment
Please, Sign In to add comment