if __name__ == '__main__':
import random
for i in range(0,10):
s = ""
for i in range(0, 3):
type = random.randint(1, 4)
if type == 1:
a = random.randint(1, 20)
b = random.randint(1, 20)
s += "%3d + %3d = " % (a, b)
elif type == 2:
a = random.randint(1, 20)
b = random.randint(1, 20)
if a < b:
tmp = a
a = b
b = tmp
s += "%3d - %3d = " % (a, b)
elif type == 3:
a = random.randint(2, 9)
b = random.randint(2, 9)
s += "%3d x %3d = " % (a, b)
elif type == 4:
a = random.randint(2, 9)
b = random.randint(2, 9)
s += "%3d / %3d = " % (a * b, b)
else:
print ('type is %d' % type)
print (s)
相关文章
- 03-19计应191西仝宣婉
- 03-19计应191(西)申振翔 口算题卡
- 03-19《算术答题卡开发流程---计应191胡甜甜》
- 03-19计应191西李明娇
- 03-19小学生口算题卡 计应191(西)靳琳琳
- 03-19计应191西第5组李成帅
- 03-19计应191(西)第二组 谢泽田
- 03-19四则运算 计应191(西)张壮飞
- 03-19计应191西 一组 刘孟琦
- 03-19计应191 西 翁余孟