Created
June 2, 2020 21:11
-
-
Save oschettler/5282f373f7c5ec7d8f7d63de3ad4ba66 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from calliope_mini import * | |
from random import randrange | |
faktor1 = 0 | |
faktor2 = 0 | |
while True: | |
if button_a.is_pressed(): | |
faktor1 = randrange(1, 10) | |
faktor2 = randrange(1, 10) | |
display.clear() | |
sleep(500) | |
display.show(str(faktor1)) | |
sleep(500) | |
display.clear() | |
display.set_pixel(2, 2, 9) | |
sleep(500) | |
display.show(str(faktor2)) | |
elif button_b.is_pressed(): | |
display.scroll(str(faktor1 * faktor2)) | |
sleep(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment