teromakotero

Python_from_Scratch_08_ratkaisu

May 13th, 2019
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. import turtle
  2. import background
  3. import time
  4.  
  5. pycat = turtle.Turtle()
  6. pycat.hideturtle()
  7. screen = turtle.Screen()
  8. image = ()
  9. image = "pycat_200_px_left.png"
  10. screen.addshape(image)
  11. pycat.shape(image)
  12. pycat.showturtle()
  13.  
  14. # KIRJOITA TÄMÄN RIVIN ALAPUOLELLE OMA KOODISI
  15. while True:
  16.   nimi = raw_input("Mikä sinun nimesi on? ")
  17.   if(nimi == "loppu"):
  18.     pycat.clear()
  19.     pycat.write("Näkemiin")
  20.     break
  21.   else:
  22.     pycat.clear()
  23.     pycat.write("Hei " + nimi)
Advertisement
Add Comment
Please, Sign In to add comment