【发布时间】:2014-09-22 07:52:20
【问题描述】:
我这里有一组问题我需要为用户随机选择,如果用户失去了等待时间是需要的
decades = 100
ans = 0
ans = int (input ("halves of 40 = "))
if ans == 20:
print ans, " is a right ans good job!"
else:
print ans, "is a Wrong ans best of luck for next quation."
ans = int (input ("halves of 10 = "))
if ans == 5:
print ans, " is a right ans good job!"
else:
print ans, "is a Wrong ans best of luck for next quation."
ans = int (input ("halves of 90 = "))
if ans == 45:
print ans, " is a right ans good job!"
else:
print ans, "is a Wrong ans best of luck for next quation."
ans = int (input ("halves of 20 = "))
if ans == 10:
print ans, " is a right ans good job!"
else:
print ans, "is a Wrong ans best of luck for next quation."
ans = int (input ("halves of 80 = "))
if ans == 40:
print ans, " is a right ans good job!"
else:
print ans, "is a Wrong ans best of luck for next quation."
ans = int (input ("halves of 30 = "))
if ans == 15:
print ans, " is a right ans good job!"
else:
print ans, "is a Wrong ans best of luck for next quation."
ans = int (input ("halves of 100 = "))
if ans == 50:
print ans, " is a right ans good job!"
else:
print ans, "is a Wrong ans best of luck for next quation."
ans = int (input ("halves of 60 = "))
if ans == 30:
print ans, " is a right ans good job!"
else:
print ans, "is a Wrong ans best of luck for next quation."
ans = int (input ("halves of 50 = "))
if ans == 25:
print ans, " is a right ans good job!"
else:
print ans, "is a Wrong ans best of luck for next quation."
ans = int (input ("halves of 70 = "))
if ans == 35:
print ans, " is a right ans good job!"
else:
print ans, "is a Wrong ans best of luck for next quation."
【问题讨论】:
-
听起来不错,您有问题吗?
-
我需要随机选择一个问题才能让游戏按要求运行
-
@EdChum,仔细阅读,他有一系列问题
-
@EdChum 你知道如何编写一个随机选择代码中一个问题的代码