Last active
November 18, 2021 15:17
-
-
Save spoterianski/d4a8e3d39eaa25bcaf715466f5662e3f 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
# Математика 4 класс | |
# Генератор примеров для вычитание четырехзначных чисел | |
import random | |
res = [] | |
for i in range(20): | |
a = random.randint(100, 9999) | |
b = random.randint(100, 9999) | |
if b > a: | |
a, b = b, a | |
print(f'{i})\n') | |
print(str(a).rjust(5, ' ')) | |
print('-') | |
print(str(b).rjust(5, ' ')) | |
print(' ----\n\n\n\n') | |
res.append(f'{i}) {a} - {b} = {a - b}') | |
for x in res: | |
print(x) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment