0
initial_bal = int(input("enter initial balance"))
withdraw_money = int(input("enter balance to withdraw"))
f = 0
if withdraw_money % 5 == 0 :
if (withdraw_money + 0.5) <= initial_bal:
f = 1
if f == 1:
account_bal = initial_bal - (withdraw_money + 0.5)
print ("remaining balance : " , account_bal)
else :
print(initial_bal)
當我上面所寫的代碼codechef提交的,則投擲運行時錯誤(NZEC)。它在我的機器上工作得很好。 任何人都可以告訴,我的代碼中的錯誤在哪裏?蟒運行時間錯誤(NZEC)
這是Python的3.x的代碼,你從列表中選擇Python 3中的實際代碼? – thefourtheye
https://github.com/SavinaRoja/PyUserInput或https://fedorahosted.org/dogtail/將會更喜歡。 – Torxed
不是實際...... – user3157110