Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RAINFALL
- def on_forever():
- rain = game.create_sprite(randint(0, 4), 0)
- for i in range(4):
- rain.change(LedSpriteProperty.Y, 1)
- basic.pause(200)
- rain.delete()
- basic.forever(on_forever)
- PLAYER :
- player = game.create_sprite(4, 2)
- def on_button_pressed_a():
- player.move(-1)
- input.on_button_pressed(Button.A, on_button_pressed_a)
- def on_button_pressed_b():
- player.move(1)
- input.on_button_pressed(Button.B, on_button_pressed_b)
- A IS GREATER THAN B OR ELSE:
- a = 100
- b = 20
- if a > b:
- basic.show_string("a is greater than b")
- else:
- basic.show_string("b is greater or equal to a")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement