Learn to Code via Tutorials on Repl.it!

← Back to all posts
Python Beginner Games Part 1: Quiz Game
HTML-96-Expert

Hi beginner guys! Today we are making a quiz game using python! Lets Get Started!

Make a new python repl and do the following Code I say.

Make a variable called score.

Type print("") and inside the quotes type a nice welcome to the game.

Then press enter and do this code:
question = input("What is 2+3?")
if question == 5:
score += 1
else:
print("Incorrect")
Repeat this code as much times as you want.

At the end do this code:
print('Your score is:', score)
print(Bye!)

And that is the end of our tutorial. See You Again Soon!
Inspirations by Basic Python Tutorial.

Comments
hotnewtop
IMayBeMe

This tutorial has multiple issues. First of all the increment a variable, += should be used. You also failed to put indentation in the control flow and didn’t put a colon after else.