thermoprint-homework/jobs/math_homework.py

14 lines
385 B
Python

import random
from .base import Job
class MathHomeworkJob(Job):
def get_name(self):
return "MALA NASOBILKA"
def print_body(self, p):
p.text("Vypocitej:\n\n")
for i in range(1, 11):
num1 = random.randint(2, 12)
num2 = random.randint(2, 12)
p.text(f"{i}) {num1} * {num2} = ____\n\n")
p.text("Hodne stesti!\n")