teromakotero

Python_from_Scratch_06_ratkaisu

May 13th, 2019
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 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. pycat.goto(0,0)
  14. pycat.penup()
  15.  
  16. # KIRJOITA TÄMÄN RIVIN ALAPUOLELLE OMA KOODISI
  17. while True:
  18.   numero = input("Anna numero")
  19.   numero = int(numero)
  20.   if(numero < 0):
  21.     pycat.clear()
  22.     pycat.write("Negatiivinen numero")
  23.     break
  24.   else:
  25.     pycat.clear()
  26.     pycat.write("Se on positiivinen numero")
Advertisement
Add Comment
Please, Sign In to add comment