在HS08TEST(Python 2.7)的问题代码上获取运行时错误NZEC
标题基本上说明了一切 代码链接:在HS08TEST(Python 2.7)的问题代码上获取运行时错误NZEC,python,Python,标题基本上说明了一切 代码链接: words=input() x=单词。拆分(“”) 撤回=浮动(x[0]) init=float(x[1]) 如果(撤消%5==0且初始化>撤消): 最终=初始-撤销-0.5 打印(最终版) elif(Init)您可以更清楚地了解您收到的错误。此代码为我运行。这是否回答了您的问题? words = input() x = words.split(' ') withdraw = float(x[0]) init = float(x[1]) if(withdraw
words=input()
x=单词。拆分(“”)
撤回=浮动(x[0])
init=float(x[1])
如果(撤消%5==0且初始化>撤消):
最终=初始-撤销-0.5
打印(最终版)
elif(Init)您可以更清楚地了解您收到的错误。此代码为我运行。这是否回答了您的问题?
words = input()
x = words.split(' ')
withdraw = float(x[0])
init = float(x[1])
if(withdraw%5==0 and init>withdraw):
final=init-withdraw-0.5
print(final)
elif(init<(withdraw+0.5) or withdraw%5!=0):
print(init)
Traceback (most recent call last):
File "prog.py", line 1, in <module>
File "<string>", line 1
30 120
^
SyntaxError: unexpected EOF while parsing