Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stage.set_background("schoolentrance")
- sprite2 = codesters.Sprite("person1")
- sprite2.move_down(40)
- def click(sprite2):
- sprite2.say("You can code us to jump, spin, and move side to side")
- stage.wait(2)
- sprite2.move_up(50)
- sprite2.move_down(90)
- sprite2.turn_left(90)
- sprite2.turn_right(90)
- sprite2.wait(1)
- sprite2.move_left(50)
- sprite2.move_right(50)
- # addsprite.hide()
- #other actions...
- sprite2.event_click(click)
- sprite = codesters.Sprite("person2")
- sprite.glide_to(-180,-40)
- def click(sprite):
- choice = sprite.ask("You can code us to play simple games. Want to guess what number I'm thinking of? Yes or no?")
- if choice == "no":
- sprite.hide()
- if choice == "yes":
- guess = int(sprite.ask("You have three tries. Enter a number from 1 to 10."))
- if guess<7:
- #add your code here
- guess2 = int(sprite.ask("Too low. Guess again!"))
- if guess2< 7:
- guess3 = int(sprite.ask("Too low. One more try!"))
- if guess3< 7:
- choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- sprite.hide()
- if guess3 > 7:
- choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- sprite.hide()
- if guess3 == 7:
- choice2 = sprite.ask("Great job! Did you have fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- # add your code here
- stage.remove_sprite(sprite)
- if guess2 > 7:
- guess3 = int(sprite.ask("Too high. One more try!"))
- if guess3< 7:
- choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- # add your code here
- stage.remove_sprite(sprite)
- if guess3 > 7:
- choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- # add your code here
- stage.remove_sprite(sprite)
- if guess3 == 7:
- choice2 = sprite.ask("Great job! Did you have fun?")
- if guess2 == 7:
- choice2 = sprite.ask("Great job! Did you have fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- # add your code here
- stage.remove_sprite(sprite)
- if guess>7:
- #add your code here
- guess2 = int(sprite.ask("Too high. Guess again!"))
- if guess2< 7:
- guess3 = int(sprite.ask("Too low. One more try!"))
- if guess3< 7:
- choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- sprite.hide()
- if guess3 > 7:
- choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- sprite.hide()
- if guess3 == 7:
- choice2 = sprite.ask("Great job! Did you have fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- # add your code here
- stage.remove_sprite(sprite)
- if guess2 > 7:
- guess3 = int(sprite.ask("Too high. One more try!"))
- if guess3< 7:
- choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- # add your code here
- stage.remove_sprite(sprite)
- if guess3 > 7:
- choice2 = sprite.ask("I was thinking of 7. Good try! Was that fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- # add your code here
- stage.remove_sprite(sprite)
- if guess3 == 7:
- choice2 = sprite.ask("Great job! Did you have fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- # add your code here
- stage.remove_sprite(sprite)
- if guess2 == 7:
- choice2 = sprite.ask("Great job! Did you have fun?")
- if choice2 == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice2 == "no":
- # add your code here
- stage.remove_sprite(sprite)
- if guess == 7:
- choice = sprite.ask("Great job! Did you have fun?")
- if choice == "yes":
- # add your code here
- sprite.move_up(50)
- sprite.move_down(50)
- if choice == "no":
- # add your code here
- stage.remove_sprite(sprite)
- # addsprite.hide()
- #other actions...
- sprite.event_click(click)
- sprite3 = codesters.Sprite("person3")
- sprite3.glide_to(100, -50)
- def click(sprite3):
- sprite3.go_to(0,0)
- sprite3.say("You can code animations")
- # add other actions...
- stage.set_background("space")
- sprite.hide()
- sprite2.hide()
- sprite4.hide()
- sprite6 = codesters.Sprite("astronaut1")
- sprite6.go_to(150,0)
- sprite7 = codesters.Sprite("rocket")
- sprite7.go_to(-200,-200)
- sprite7.move_up(600)
- sprite8 = codesters.Sprite("meteor1")
- sprite8.go_to(-200,-150)
- sprite8.move_right(550)
- sprite3.hide
- choice = sprite6.ask("Do you want to go back to school? Click on the green run button to go back to school!")
- sprite3.event_click(click)
- sprite4 = codesters.Sprite("codesters")
- sprite4.glide_to(0, -280)
- 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