ch = input('please enter a char: ')
if ch.isupper():
print("這是大寫")
elif ch.islower():
print("這是小寫")
elif ch.isdigit():
print("這是數字")
elif ch.isspace():
print("這是特殊數字")
score=int(input("輸入你的成績>>>>"))
rank = None "先給rank一個初始值"
if 90 <=score<100:
rank="A"
elif 60 <=score<90:
rank="B"
elif 0 <=score<60:
rank="C"
if rank !=None: "!=為不等於"
print("你的分數為:",score,end=" ") #結尾end=" "輸出不換行,空白間隔
print("你的分數落點為:",rank)
else:
print("請輸入正確的分數")