The following program demonstrates how to Create a Simple Addition Quiz in Python.

Basically, this program demonstrates the use of randint() function of the random object in python. This function generates a random number between two values given as its parameters.

# programmingempire.com

import random
number1 = random.randint(0,10)
number2 = random.randint(0,10)
answer =eval(input("What is" + str(number1)+ " + " +str(number2) + "?"))
print(number1,"+", number2,"=",answer, "is",number1+number2 ==answer)

Output

A Program to Create a Simple Addition Quiz in Python
A Program to Create a Simple Addition Quiz in Python

Further Reading

Python Practice Exercise

Examples of OpenCV Library in Python

Examples of Tuples in Python

Python List Practice Exercise

A Brief Introduction of Pandas Library in Python

A Brief Tutorial on NumPy in Python

programmingempire

princites.com

IITM Software Development Cell