-3
我有一組的問題在這裏,我需要隨機的用戶選擇,如果用戶丟失了等待時間需要列表內選擇一個隨機變量
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 2014-09-22 07:53:52
我需要隨機選擇其中一個問題以便遊戲按照要求運行 – 2014-09-22 07:57:01
@EdChum,仔細閱讀,他有一組問題 – Elisha 2014-09-22 07:57:09