Дима латыпов
Знаток
(433)
1 год назад
(это на питон)
def quest _plot(): # Code to work out your own plot of the quest
# Variables to keep track of the progress
current_level = 0
progress = 0
# Main loop
while progress < 5:
# Ask the user to find the right button
answer = input("Find the right button to advance further: ")
# Check if the answer is correct and increment progress if it is
if answer == "correct":
progress += 1
current_level += 1
print("Correct! You are now at level {}".format(current_level))
else:
print("Incorrect. Please try again.")
print("Congratulations! You have completed all 5 levels of the quest!")
quest_plot()
Добавить больше интересных задач в квесте(например: найти нужную кнопку которая позволит продвинуться дальше)
Добавить 5 уровней квеста.