V
V
vert212020-05-26 20:01:53
Python
vert21, 2020-05-26 20:01:53

How to make sequential code?

Good evening! I am writing a bot for VK on Longpoll. Now I'm trying to make a quiz, but I have the following problem:
All answers to the quiz go sequentially through elif. Because of this, the answer to the riddle "winter and summer are the same color" can serve as an answer to the previous riddle
. I need other answers to not work on this riddle

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MechanicZelenyy, 2020-05-26
@MechanicZelenyy

Make a class for the riddle, with a method that checks the answer, create instances of this class for each riddle, select a riddle object, and check the answer through its method.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question