python 中的语法错误出于某种我不知道的原因
Syntax error in python for some reason I do not know
我是 运行 其他人的简单代码并收到此错误我不明白为什么它显示语法错误
oddcounter = 0
total = 0
for i in range(0, 10, 1):
number =int(input("please enter the number:")
if number%2 != 0:
total = total + 1
oddcounter = oddcounter + 1
average = total/oddcounter
print("the total of the odd numbers is", total, "and their average is", average)
我收到以下错误
为什么显示语法错误?
int 没有以‘)’结束。请关闭它以清除此错误。
我是 运行 其他人的简单代码并收到此错误我不明白为什么它显示语法错误
oddcounter = 0
total = 0
for i in range(0, 10, 1):
number =int(input("please enter the number:")
if number%2 != 0:
total = total + 1
oddcounter = oddcounter + 1
average = total/oddcounter
print("the total of the odd numbers is", total, "and their average is", average)
我收到以下错误
为什么显示语法错误?
int 没有以‘)’结束。请关闭它以清除此错误。