18/10/20 18:28:45.80 AUqXYm6F.net
>>152
python3
state = "sleep"
while True:
x = input("> ")
if x == "hi":
print("zzz..." if state == "sleep" else "hello")
elif x == "wake up":
state = "wake up"
elif x == "sleep":
state = "sleep"
else:
print("invalid input.")