Skip to content

need help with python and pygame #21520

Answered by fire-eggs
nivanda asked this question in General
Discussion options

You must be logged in to vote

Your sentence “I want to move between answer ‘a’ and answer ‘b’” is a little unclear, so I’m a little uncertain about what you’re trying to do.

If you are trying to re-use questions, or have additional sequences of questions, you might try using python functions to post questions and check answers. Since each of your questions are two-answer questions, you can return a boolean result from the functions.

if (question1()):
  if (question2()):
    if (question3()):
      goodend()
    else:
      badend()
  else:
      badend()
else:
  if (question3()):
    goodend()
  else:
    badend()

So above, the question1() function asks your first question, returns true if the answer is “koba ringi”.…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants