r/pythonhelp • • Jul 06 '18

How to prevent someone from continuing a quiz?

Im trying to make a quiz game with python3. I want to make it for over 13 years olds, so how do i prevent someone how is not over 13yo from continuing.

0 Upvotes

2 comments sorted by

1

u/[deleted] Jul 06 '18

The simplest way I can think of is using some user input and then an if statement. Like:

age = int( input( 'Enter your age: '))
if ( age<13 ):
    quit()

Of course, there is no way to make the user accountable in this scenario. If you wanted to complicate things maybe you could do something with ID's? Not sure.

2

u/ToniPaakkari Jul 06 '18

Thank you mate!