有没有好朋友讲解一下

img

我弄了好久都说语法错误 有没有好朋友帮我看看 应该不难 但我就是不成功

img

语法问题挺多的,首先注意括号要成对,然后还要注意缩进。

在每一个循环,或者判断语句后面要加:括号要用英文符号的半角括号,还有缩进


# By yangbocsu 2021.09.26

x = input("x=?")

if x.isdigit():
    print("number")
    
elif x.isalpha():
    print("character")
else:
    print("other")