Advertisement
Guest User

Untitled

a guest
Feb 17th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.20 KB | None | 0 0
  1. stage.set_background("schoolentrance")
  2. sprite2 = codesters.Sprite("person1")
  3. sprite2.move_down(40)
  4. def click(sprite2):
  5. sprite2.say("You can code us to jump, spin, and move side to side")
  6. stage.wait(2)
  7. sprite2.move_up(50)
  8. sprite2.move_down(90)
  9. sprite2.turn_left(90)
  10. sprite2.turn_right(90)
  11. sprite2.wait(1)
  12. sprite2.move_left(50)
  13. sprite2.move_right(50)
  14. # addsprite.hide()
  15. #other actions...
  16. sprite2.event_click(click)
  17. sprite = codesters.Sprite("person2")
  18. sprite.glide_to(-180,-40)
  19. def click(sprite):
  20. choice = sprite.ask("You can code us to play simple games. Want to guess what number I'm thinking of? Yes or no?")
  21. if choice == "no":
  22. sprite.hide()
  23. if choice == "yes":
  24.  
  25. guess = int(sprite.ask("You have three tries. Enter a number from 1 to 10."))
  26.  
  27. if guess<7:
  28. #add your code here
  29. guess2 = int(sprite.ask("Too low. Guess again!"))
  30. if guess2< 7:
  31. guess3 = int(sprite.ask("Too low. One more try!"))
  32. if guess3< 7:
  33. choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
  34. if choice2 == "yes":
  35. # add your code here
  36. sprite.move_up(50)
  37. sprite.move_down(50)
  38. if choice2 == "no":
  39. sprite.hide()
  40.  
  41. if guess3 > 7:
  42. choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
  43. if choice2 == "yes":
  44. # add your code here
  45. sprite.move_up(50)
  46. sprite.move_down(50)
  47. if choice2 == "no":
  48. sprite.hide()
  49.  
  50. if guess3 == 7:
  51. choice2 = sprite.ask("Great job! Did you have fun?")
  52. if choice2 == "yes":
  53. # add your code here
  54. sprite.move_up(50)
  55. sprite.move_down(50)
  56.  
  57. if choice2 == "no":
  58. # add your code here
  59. stage.remove_sprite(sprite)
  60.  
  61. if guess2 > 7:
  62. guess3 = int(sprite.ask("Too high. One more try!"))
  63. if guess3< 7:
  64. choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
  65. if choice2 == "yes":
  66. # add your code here
  67. sprite.move_up(50)
  68. sprite.move_down(50)
  69.  
  70. if choice2 == "no":
  71. # add your code here
  72. stage.remove_sprite(sprite)
  73.  
  74.  
  75. if guess3 > 7:
  76. choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
  77. if choice2 == "yes":
  78. # add your code here
  79. sprite.move_up(50)
  80. sprite.move_down(50)
  81.  
  82. if choice2 == "no":
  83. # add your code here
  84. stage.remove_sprite(sprite)
  85.  
  86.  
  87. if guess3 == 7:
  88. choice2 = sprite.ask("Great job! Did you have fun?")
  89.  
  90. if guess2 == 7:
  91. choice2 = sprite.ask("Great job! Did you have fun?")
  92. if choice2 == "yes":
  93. # add your code here
  94. sprite.move_up(50)
  95. sprite.move_down(50)
  96.  
  97. if choice2 == "no":
  98. # add your code here
  99. stage.remove_sprite(sprite)
  100.  
  101. if guess>7:
  102. #add your code here
  103. guess2 = int(sprite.ask("Too high. Guess again!"))
  104. if guess2< 7:
  105. guess3 = int(sprite.ask("Too low. One more try!"))
  106. if guess3< 7:
  107. choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
  108. if choice2 == "yes":
  109. # add your code here
  110. sprite.move_up(50)
  111. sprite.move_down(50)
  112. if choice2 == "no":
  113. sprite.hide()
  114.  
  115. if guess3 > 7:
  116. choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
  117. if choice2 == "yes":
  118. # add your code here
  119. sprite.move_up(50)
  120. sprite.move_down(50)
  121. if choice2 == "no":
  122. sprite.hide()
  123.  
  124. if guess3 == 7:
  125. choice2 = sprite.ask("Great job! Did you have fun?")
  126. if choice2 == "yes":
  127. # add your code here
  128. sprite.move_up(50)
  129. sprite.move_down(50)
  130.  
  131. if choice2 == "no":
  132. # add your code here
  133. stage.remove_sprite(sprite)
  134.  
  135. if guess2 > 7:
  136. guess3 = int(sprite.ask("Too high. One more try!"))
  137. if guess3< 7:
  138. choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
  139. if choice2 == "yes":
  140. # add your code here
  141. sprite.move_up(50)
  142. sprite.move_down(50)
  143.  
  144. if choice2 == "no":
  145. # add your code here
  146. stage.remove_sprite(sprite)
  147.  
  148.  
  149. if guess3 > 7:
  150. choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
  151. if choice2 == "yes":
  152. # add your code here
  153. sprite.move_up(50)
  154. sprite.move_down(50)
  155.  
  156. if choice2 == "no":
  157. # add your code here
  158. stage.remove_sprite(sprite)
  159.  
  160.  
  161. if guess3 == 7:
  162. choice2 = sprite.ask("Great job! Did you have fun?")
  163. if choice2 == "yes":
  164. # add your code here
  165. sprite.move_up(50)
  166. sprite.move_down(50)
  167.  
  168. if choice2 == "no":
  169. # add your code here
  170. stage.remove_sprite(sprite)
  171.  
  172. if guess2 == 7:
  173. choice2 = sprite.ask("Great job! Did you have fun?")
  174. if choice2 == "yes":
  175. # add your code here
  176. sprite.move_up(50)
  177. sprite.move_down(50)
  178.  
  179. if choice2 == "no":
  180. # add your code here
  181. stage.remove_sprite(sprite)
  182.  
  183. if guess == 7:
  184. choice = sprite.ask("Great job! Did you have fun?")
  185. if choice == "yes":
  186. # add your code here
  187. sprite.move_up(50)
  188. sprite.move_down(50)
  189.  
  190. if choice == "no":
  191. # add your code here
  192. stage.remove_sprite(sprite)
  193.  
  194.  
  195.  
  196. # addsprite.hide()
  197. #other actions...
  198. sprite.event_click(click)
  199.  
  200.  
  201. sprite3 = codesters.Sprite("person3")
  202. sprite3.glide_to(100, -50)
  203.  
  204. def click(sprite3):
  205. sprite3.go_to(0,0)
  206. sprite3.say("You can code animations")
  207. # add other actions...
  208. stage.set_background("space")
  209. sprite.hide()
  210. sprite2.hide()
  211. sprite4.hide()
  212. sprite6 = codesters.Sprite("astronaut1")
  213. sprite6.go_to(150,0)
  214. sprite7 = codesters.Sprite("rocket")
  215. sprite7.go_to(-200,-200)
  216. sprite7.move_up(600)
  217. sprite8 = codesters.Sprite("meteor1")
  218. sprite8.go_to(-200,-150)
  219. sprite8.move_right(550)
  220. sprite3.hide
  221. choice = sprite6.ask("Do you want to go back to school? Click on the green run button to go back to school!")
  222.  
  223. sprite3.event_click(click)
  224.  
  225.  
  226.  
  227.  
  228. sprite4 = codesters.Sprite("codesters")
  229. sprite4.glide_to(0, -280)
  230. sprite4.say("Welcome to Codesters! Click on each of us to learn about things you can do with the program.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement