Код: Выделить всё
def random_game(user_input):
if "random number" in user_input and "play" in user_input:
print("Okay! We'll play the Random Number game!! ")
random_num_game()
return None
else:
return "Sorry, I can't understand that."
def calc_culator(user_input):
if "calculator" in user_input:
print("Sure tell what to do! ")
calculator_mode()
return None
else:
return "Sorry I can't understand that."
def dod():
print("Dod: Yo! What do you want to do today champ? ")
while True:
user_input = input("User: ").lower()
if user_input in ["exit", "cancel"]:
print("Okay I'll turn off now.")
break
response = random_game(user_input)
if response:
print(f"Dod: {response}")
response_2 = calc_culator(user_input)
if response_2:
print(f"Dod: {response_2}")
< /code>
Это функция, которая сначала должна отображаться в выводе. Скажи, что я делаю не так?>
Подробнее здесь: https://stackoverflow.com/questions/793 ... ing-called
Мобильная версия