摘要:
import randomdef add(): ''' 获取随机的加法 :return: ''' a = random.randint(0, 19) b = random.randint(0, 19 - a) return a, b, a + bdef sub(): ''' 获取随机的减法 :ret 阅读全文
posted @ 2023-09-12 11:17
lm9856
阅读(34)
评论(0)
推荐(0)
摘要:
import randomdef generate_question(): operator = random,choice(['+','-']) num1 = random.randint(1,20) num2 = random.randint(1,20) if operator == '+': 阅读全文
posted @ 2023-09-12 10:54
lm9856
阅读(64)
评论(0)
推荐(0)