Quiz Game Coding in Python
Quiz Game Coding in Python
#angram module
def anagram():
points=0
if ans1=="APPLE":
points=points+20
else:
points=points-5
if ans2=="jasmine":
points=points+20
else:
points=point-5
def world():
points=0
points=points+30
points=points+15
else:
points=points-5
points=points+30
points=points+15
else:
points=points-5
def mentalmaths():
points=0
num1=random.randint(1,10)
num2=random.randint(1,10)
crctanswer=num1+num2
if ans1==crctanswer:
points=points+20
else:
points=points-5
num1=random.randint(1,10)
num2=random.randint(1,10)
crctanswer=num1+num2
if ans1==crctanswer:
points=points+20
else:
points=points-5
def welcome():
print("Welcome to my program")
print("1. The Anagram Room\n 2. The World Room\n 3. The Mental Maths
room ")
if choice == '1':
score=anagram()
elif choice=='2':
score=world()
else:
score=mentalmaths()
import random
minage=8
if age<8:
else:
welcome()
import turtle
turtle.pensize(3)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
#angram module
def anagram():
points=0
if ans1=="APPLE":
points=points+20
else:
points=points-5
if ans2=="jasmine":
points=points+20
else:
points=point-5
def world():