1)我有這樣的代碼迄今while循環,但我想循環僅12倍:Python中的操作菜單
print ("Please enter the 12 monthly figures")
input ("Enter a value in the range 0 to 300:")
我試圖for循環,但它沒有經營
2)我要創造我的代碼菜單,到目前爲止,我有這樣的:
print ("Please choose one of the following options:")
ans=True
while ans:
print ("""
0. Quit
1. Work out and display the total
3. Work out and display the mean
4. Work out and display the standard deviation
5. Work out and display the median
6. Work out and display the lowest and second lowest
7. Work out and display the 3 month
8. Work out and display the months
9. Work out display level
""")
,但我想,讓用戶選擇一個
什麼是你當前的代碼? – 2014-11-24 00:50:44