Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

import easygui

score = 0

#Question1

msg ="How many second in one day?"


title = "Time"
choices = ["86200", "86400", "86600", "86800"]
choice = easygui.choicebox(msg, title, choices)

if choice == "86400":
score = score + 10

#Question2

a = easygui.ynbox("1 day have 24 hours.")


if a == True:
score = score + 10

#Question3

answer = easygui.enterbox("What is nucleolus produce?")


if answer == "ribosome":
score = score + 10

#Question4

answer = easygui.enterbox("What is TMR stands from")


if answer == "tomorrow":
score = score + 10

#Question5

msg ="What is the word see is closest in meaning to"


title = "Vocabulary"
choices = ["eat", "bee", "look", "listen"]
choice = easygui.choicebox(msg, title, choices)

if choice == "look":
score = score + 10

#Question6

a = easygui.ynbox("sky is pink.")
if a == False:
score = score + 10

#Question7

answer = easygui.enterbox("What come after 2016? ")


if answer == "2017":
score = score + 10

#Question8

msg ="What is the capital city of Saudi Arabia"


title = "Capital city"
choices = ["Riyadh", "Jeddah", "Mecca", "Abha"]
choice = easygui.choicebox(msg, title, choices)

if choice == "Riyadh":
score = score + 10

#Question9

a = easygui.ynbox("If you hungry, you need to eat.")


if a == True:
score = score + 10
#Question10

msg ="What is the meaning of "


title = "Thai language"
choices = ["wallet", "bag", "money", "pouch"]
choice = easygui.choicebox(msg, title, choices)

if choice == "wallet":
score = score + 10

if score >= 90:


lettergrade = "A"

elif score >= 80:


lettergrade = "B"

elif score >= 70:


lettergrade = "C"

elif score >= 60:


lettergrade = "D"

else:
score >= 50
lettergrade = "F"

easygui.msgbox("Your score is:" + lettergrade + str(score) + "%")

You might also like