Hello, I just finished my "Who wants to be a millionaire Game", (very basic coding), but I got some issues when I click somewhere out of the Boxes range(try it), and I'd like to add some sort of points to each question, and as they go further make the question points go higher, but I don't know how to, can someone help me?
from graphics import *
win = GraphWin("Who wants to be a millionaire", 600, 400)
win.setBackground('Black')
## QUESTIONS FROM 1-15
def q1():
centertxt = Point(300,100)
label = Text(centertxt, "What is the largest animal ever to live on Earth?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "Blue Whale")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "Chicken")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "Shark")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "Elephant")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
# CORRECT ANSWER
center = Point(300,200)
congrats = Text(center, "CORRECT!!!")
congrats.setTextColor('White')
congrats.setSize(30)
congrats.draw(win)
#Next Question Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "Next Question >>")
stxt.setSize(12)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to go to next Question
win.getMouse()
congrats.undraw()
SRect.undraw()
stxt.undraw()
q2()
#Second Possible Answer
elif p.getX() >= 353 and p.getX() <= 496 and p.getY() >= 201 and p.getY() <= 245:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Third Possible Asnwer
elif p.getX() >= 104 and p.getX() <= 245 and p.getY() >= 302 and p.getY() <= 344:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Fourth Possible Answer
elif p.getX() >= 353 and p.getX() <= 494 and p.getY() >= 303 and p.getY() <= 346:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
def q2():
centertxt = Point(300,100)
label = Text(centertxt, "Which of these animals shares its name with a luxury car?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "Star")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "Jaguar")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "Ryno")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "Eagle")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Second Possible Answer
elif p.getX() >= 353 and p.getX() <= 496 and p.getY() >= 201 and p.getY() <= 245:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
# CORRECT ANSWER
center = Point(300,200)
congrats = Text(center, "CORRECT!!!")
congrats.setTextColor('White')
congrats.setSize(30)
congrats.draw(win)
#Next Question Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "Next Question >>")
stxt.setSize(12)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to go to next Question
win.getMouse()
congrats.undraw()
SRect.undraw()
stxt.undraw()
q3()
#Third Possible Asnwer
elif p.getX() >= 104 and p.getX() <= 245 and p.getY() >= 302 and p.getY() <= 344:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Fourth Possible Answer
elif p.getX() >= 353 and p.getX() <= 494 and p.getY() >= 303 and p.getY() <= 346:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
def q3():
centertxt = Point(300,100)
label = Text(centertxt, "What sport is known as ''The Sport of Kings''?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "Horse Racing")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "Football")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "Soccer")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "Motocross")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
# CORRECT ANSWER
center = Point(300,200)
congrats = Text(center, "CORRECT!!!")
congrats.setTextColor('White')
congrats.setSize(30)
congrats.draw(win)
#Next Question Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "Next Question >>")
stxt.setSize(12)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to go to next Question
win.getMouse()
congrats.undraw()
SRect.undraw()
stxt.undraw()
q4()
#Second Possible Answer
elif p.getX() >= 353 and p.getX() <= 496 and p.getY() >= 201 and p.getY() <= 245:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Third Possible Asnwer
elif p.getX() >= 104 and p.getX() <= 245 and p.getY() >= 302 and p.getY() <= 344:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Fourth Possible Answer
elif p.getX() >= 353 and p.getX() <= 494 and p.getY() >= 303 and p.getY() <= 346:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
def q4():
centertxt = Point(300,100)
label = Text(centertxt, "In baseball, how many ball make a walk?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "3")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "5")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "2")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "4")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Second Possible Answer
elif p.getX() >= 353 and p.getX() <= 496 and p.getY() >= 201 and p.getY() <= 245:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Third Possible Asnwer
elif p.getX() >= 104 and p.getX() <= 245 and p.getY() >= 302 and p.getY() <= 344:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Fourth Possible Answer
elif p.getX() >= 353 and p.getX() <= 494 and p.getY() >= 303 and p.getY() <= 346:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
# CORRECT ANSWER
center = Point(300,200)
congrats = Text(center, "CORRECT!!!")
congrats.setTextColor('White')
congrats.setSize(30)
congrats.draw(win)
#Next Question Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "Next Question >>")
stxt.setSize(12)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to go to next Question
win.getMouse()
congrats.undraw()
SRect.undraw()
stxt.undraw()
q5()
def q5():
centertxt = Point(300,100)
label = Text(centertxt, "Where is fireworks first known to have been develop?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "China")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "USA")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "Russia")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "England")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
# CORRECT ANSWER
center = Point(300,200)
congrats = Text(center, "CORRECT!!!")
congrats.setTextColor('White')
congrats.setSize(30)
congrats.draw(win)
#Next Question Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "Next Question >>")
stxt.setSize(12)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to go to next Question
win.getMouse()
congrats.undraw()
SRect.undraw()
stxt.undraw()
q6()
#Second Possible Answer
elif p.getX() >= 353 and p.getX() <= 496 and p.getY() >= 201 and p.getY() <= 245:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Third Possible Asnwer
elif p.getX() >= 104 and p.getX() <= 245 and p.getY() >= 302 and p.getY() <= 344:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Fourth Possible Answer
elif p.getX() >= 353 and p.getX() <= 494 and p.getY() >= 303 and p.getY() <= 346:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
def q6():
centertxt = Point(300,100)
label = Text(centertxt, "What is the correct spelling of New Mexico's largest city?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "Albuquerquue")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "Albuqerque")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "Albuquerque")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "Albeuquerque")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Second Possible Answer
elif p.getX() >= 353 and p.getX() <= 496 and p.getY() >= 201 and p.getY() <= 245:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Third Possible Asnwer
elif p.getX() >= 104 and p.getX() <= 245 and p.getY() >= 302 and p.getY() <= 344:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
# CORRECT ANSWER
center = Point(300,200)
congrats = Text(center, "CORRECT!!!")
congrats.setTextColor('White')
congrats.setSize(30)
congrats.draw(win)
#Next Question Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "Next Question >>")
stxt.setSize(12)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to go to next Question
win.getMouse()
congrats.undraw()
SRect.undraw()
stxt.undraw()
q7()
#Fourth Possible Answer
elif p.getX() >= 353 and p.getX() <= 494 and p.getY() >= 303 and p.getY() <= 346:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
def q7():
centertxt = Point(300,100)
label = Text(centertxt, "Which of these is not one of the official languages of the United Nations?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "Japanese")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "English")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "French")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "Spanish")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
# CORRECT ANSWER
center = Point(300,200)
congrats = Text(center, "CORRECT!!!")
congrats.setTextColor('White')
congrats.setSize(30)
congrats.draw(win)
#Next Question Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "Next Question >>")
stxt.setSize(12)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to go to next Question
win.getMouse()
congrats.undraw()
SRect.undraw()
stxt.undraw()
q8()
#Second Possible Answer
elif p.getX() >= 353 and p.getX() <= 496 and p.getY() >= 201 and p.getY() <= 245:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Third Possible Asnwer
elif p.getX() >= 104 and p.getX() <= 245 and p.getY() >= 302 and p.getY() <= 344:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Fourth Possible Answer
elif p.getX() >= 353 and p.getX() <= 494 and p.getY() >= 303 and p.getY() <= 346:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
def q8():
centertxt = Point(300,100)
label = Text(centertxt, "Which of these countries was not a member of the Axix alliance during WorldWar II?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "USA")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "England")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "France")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "Spain")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Second Possible Answer
elif p.getX() >= 353 and p.getX() <= 496 and p.getY() >= 201 and p.getY() <= 245:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Third Possible Asnwer
elif p.getX() >= 104 and p.getX() <= 245 and p.getY() >= 302 and p.getY() <= 344:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Fourth Possible Answer
elif p.getX() >= 353 and p.getX() <= 494 and p.getY() >= 303 and p.getY() <= 346:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
# CORRECT ANSWER
center = Point(300,200)
congrats = Text(center, "CORRECT!!!")
congrats.setTextColor('White')
congrats.setSize(30)
congrats.draw(win)
#Next Question Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "Next Question >>")
stxt.setSize(12)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to go to next Question
win.getMouse()
congrats.undraw()
SRect.undraw()
stxt.undraw()
q9()
def q8():
centertxt = Point(300,100)
label = Text(centertxt, "Which of these food is poisonous to dogs?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "Pork")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "Chocolate")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "Egg Yolks")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "Pepper")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Second Possible Answer
elif p.getX() >= 353 and p.getX() <= 496 and p.getY() >= 201 and p.getY() <= 245:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
# CORRECT ANSWER
center = Point(300,200)
congrats = Text(center, "CORRECT!!!")
congrats.setTextColor('White')
congrats.setSize(30)
congrats.draw(win)
#Next Question Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "Next Question >>")
stxt.setSize(12)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to go to next Question
win.getMouse()
congrats.undraw()
SRect.undraw()
stxt.undraw()
q9()
#Third Possible Asnwer
elif p.getX() >= 104 and p.getX() <= 245 and p.getY() >= 302 and p.getY() <= 344:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Fourth Possible Answer
elif p.getX() >= 353 and p.getX() <= 494 and p.getY() >= 303 and p.getY() <= 346:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
def q9():
centertxt = Point(300,100)
label = Text(centertxt, "Which of these is not found in a Snickers candy bar?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "Chocolate")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "Sugar")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "Milk")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "Almonds")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Second Possible Answer
elif p.getX() >= 353 and p.getX() <= 496 and p.getY() >= 201 and p.getY() <= 245:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Third Possible Asnwer
elif p.getX() >= 104 and p.getX() <= 245 and p.getY() >= 302 and p.getY() <= 344:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Fourth Possible Answer
elif p.getX() >= 353 and p.getX() <= 494 and p.getY() >= 303 and p.getY() <= 346:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
# CORRECT ANSWER
center = Point(300,200)
congrats = Text(center, "CORRECT!!!")
congrats.setTextColor('White')
congrats.setSize(30)
congrats.draw(win)
#Next Question Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "Next Question >>")
stxt.setSize(12)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to go to next Question
win.getMouse()
congrats.undraw()
SRect.undraw()
stxt.undraw()
q10()
def q10():
centertxt = Point(300,100)
label = Text(centertxt, "If you ask for ''gai'' at a Thai restaurant, what will you get?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "Chicken")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "Salt")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "Beef")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "Green Peas")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
# CORRECT ANSWER
center = Point(300,200)
congrats = Text(center, "CORRECT!!!")
congrats.setTextColor('White')
congrats.setSize(30)
congrats.draw(win)
#Next Question Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "Next Question >>")
stxt.setSize(12)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to go to next Question
win.getMouse()
congrats.undraw()
SRect.undraw()
stxt.undraw()
q11()
#Second Possible Answer
elif p.getX() >= 353 and p.getX() <= 496 and p.getY() >= 201 and p.getY() <= 245:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Third Possible Asnwer
elif p.getX() >= 104 and p.getX() <= 245 and p.getY() >= 302 and p.getY() <= 344:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Fourth Possible Answer
elif p.getX() >= 353 and p.getX() <= 494 and p.getY() >= 303 and p.getY() <= 346:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
def q11():
centertxt = Point(300,100)
label = Text(centertxt, "Which of these horror films spawned the most sequels?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "Saw")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "Friday the 13th")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "Texas Massacre")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "Freddy Vs Jason")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Second Possible Answer
elif p.getX() >= 353 and p.getX() <= 496 and p.getY() >= 201 and p.getY() <= 245:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
# CORRECT ANSWER
center = Point(300,200)
congrats = Text(center, "CORRECT!!!")
congrats.setTextColor('White')
congrats.setSize(30)
congrats.draw(win)
#Next Question Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "Next Question >>")
stxt.setSize(12)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to go to next Question
win.getMouse()
congrats.undraw()
SRect.undraw()
stxt.undraw()
q12()
#Third Possible Asnwer
elif p.getX() >= 104 and p.getX() <= 245 and p.getY() >= 302 and p.getY() <= 344:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
#Fourth Possible Answer
elif p.getX() >= 353 and p.getX() <= 494 and p.getY() >= 303 and p.getY() <= 346:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)
stxt.setStyle('bold')
stxt.setTextColor('White')
stxt.draw(win)
#Wait for Mouse Click to Restart Game
win.getMouse()
bu.undraw()
SRect.undraw()
stxt.undraw()
main()
def q12():
centertxt = Point(300,100)
label = Text(centertxt, "What is a balalaika?")
label.setTextColor('White')
label.draw(win)
# Button 1
a1center = Point(175,225)
a1 = Rectangle(Point(100, 200),Point(250, 250))
a1.setOutline('White')
a1.draw(win)
# Button 2
a2center = Point(427,224)
a2 = Rectangle(Point(350,200), Point(500,250))
a2.setOutline('White')
a2.draw(win)
# Button 3
a3center = Point(174,326)
a3 = Rectangle(Point(350,300), Point(500,350))
a3.setOutline('White')
a3.draw(win)
# Button 4
a4center = Point(425,325)
a4 = Rectangle(Point(100,300), Point(250,350))
a4.setOutline('White')
a4.draw(win)
#Answer 1
label1 = Text(a1center, "Fish")
label1.setTextColor('White')
label1.draw(win)
#Answer 2
label2 = Text(a2center, "Dance")
label2.setTextColor('White')
label2.draw(win)
#Answer 3
label3 = Text(a3center, "Brand")
label3.setTextColor('White')
label3.draw(win)
#Answer 4
label4 = Text(a4center, "Musical Instrument")
label4.setTextColor('White')
label4.draw(win)
p = win.getMouse()
#First Possible Answer
if p.getX() >= 103 and p.getX() <= 246 and p.getY() >= 202 and p.getY() <= 246:
label.undraw()
a1.undraw()
a2.undraw()
a3.undraw()
a4.undraw()
label1.undraw()
label2.undraw()
label3.undraw()
label4.undraw()
#WRONG ANSWER
center2 = Point(300,60)
bu = Text(center2, "WRONG ANSWER !! BUUU!")
bu.setTextColor('White')
bu.setSize(30)
bu.draw(win)
#Restart Button
SRect = Rectangle(Point(220,250),Point(400,300))
SRect.draw(win)
SRect.setOutline('White')
centerstart = Point(310,275)
stxt = Text(centerstart, "RESTART")
stxt.setSize(18)