Android OS Forum banner
1 - 2 of 2 Posts

· Registered
Joined
·
27 Posts
Discussion Starter · #1 ·
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.
 

· Registered
Joined
·
27 Posts
Discussion Starter · #2 ·
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 python programming, I just don’t know what to do when the user puts which quiz they want to do.
thanks in advance for any help
 
1 - 2 of 2 Posts
Top