Let’s say I have two blocks of code that are used for different things (A block of code for a math quiz, and a block of code
for a Vocab quiz). Can I make each block of code a variable/class of some sort, let me give an example:
if answer == “I Choose Math Quiz!”: print(MathQuizCode)
elif answer == “I choose Vocab Quiz!” print(VocabQuizCode)
I have the code for both the math and Vocab quiz, I just don’t know what to do when the user puts which quiz they want to do.
for a Vocab quiz). Can I make each block of code a variable/class of some sort, let me give an example:
if answer == “I Choose Math Quiz!”: print(MathQuizCode)
elif answer == “I choose Vocab Quiz!” print(VocabQuizCode)
I have the code for both the math and Vocab quiz, I just don’t know what to do when the user puts which quiz they want to do.