Skip to content

Instantly share code, notes, and snippets.

@oschettler
Created June 2, 2020 21:11
Show Gist options
  • Save oschettler/5282f373f7c5ec7d8f7d63de3ad4ba66 to your computer and use it in GitHub Desktop.
Save oschettler/5282f373f7c5ec7d8f7d63de3ad4ba66 to your computer and use it in GitHub Desktop.
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