嗨,即時通訊目前堅持這一挑戰,我試圖解決它的一天了,我可能是愚蠢的,因爲它的東西很簡單,但即時在字面上腦死了,太累了花了太多時間試圖弄清楚這樣的IM要去尋求幫助,看是否有人能解決這個問題,感謝您的幫助:)挑選挑戰4:蟒蛇挑戰
這是我在它的企圖,這是我所有的代碼不工作:(
station1 = int(input("Enter the number of stations: "))
adult = int(input("How many adults will be with you: "))
child = int(input("How many children will be with you: "))
time = int(input("And what is the time you wish to travel (24 hour clock): "))
station2 = station1 * 20
if station2 > 0:
print ("Current fair is: ", station2)
if child > 0:
station2 = station2/2
print ("Because of children its half price: ", station2)
elif time == 6:
station2 * 5
print (station2)
elif time == 7:
station2 * 5
print (station2)
elif time == 8:
station2 * 5
print (station2)
elif time == 9:
station2 * 5
print (station2)
else:
print (station2)
else:
print ("you need at least one station")
你介意說明你的代碼的實際問題是什麼? 「它不工作」意味着我們必須找出問題並解決問題。 – Aurora0001
那麼我的代碼的問題是,它不會輸出所需的輸出需要顯示在上面的屏幕截圖 – OkamiBushi