addition-two-digits.py
325 Bytes
#!/usr/bin/env python3
import random
import sys
a = int(sys.argv[1])
b = int(sys.argv[2])
x = random.randint(a, b)
y = random.randint(a, b)
r = x + y
print(f'''---
type: text
title: Adição de números com 2 algarismos
text: |
Qual o resultado da soma ${x}+{y}$?
correct: ['{r}']
solution: |
O resultado é {r}.''')