私は初心者のPythonプログラマーです。助けが必要です。
lightcolor=int(input("Enter Red,Green,Yellow,White,Purple,Blue,Orange,Brown,or Black->"))
if lightcolor=="Red":
print("Red Light-Please stop!!")
elif lightcolor=="Green":
print("Green Light-Please continue")
elif lightcolor=="Yellow":
print("Yellow Light-speed up")
elif lightcolor=="White":
print("White Light-its too bright")
elif lightcolor=="Purple":
print("Purple Light-pretty")
elif lightcolor=="Blue":
print("Blue Light-thats unusual")
elif lightcolor=="Orange":
print("Orange Light-bright as the sun")
elif lightcolor=="Brown":
print("Brown Light-like dirt")
elif lightcolor=="Black":
print("Black Light-very dark")
else:
print("Sorry no such color"),lightcolor
色を入力するたびに基本エラーで int() の無効なリテラルを取得するのはなぜですか? python 3を使用しています。タンクを助けてください intを修正しましたが、うまくいきました。