Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def details():
- create = False
- myfile = open("day.txt", "a+")
- myfile.write(str("username" + "password"))
- myfile.write("/n")
- while create == False:
- name = (raw_input("Enter Your Name"))
- age = (raw_input("Enter Your Age"))
- yr_group=int(input("Enter Your Year Group"))
- username = (name[0:3])+str(age)
- password = raw_input("Enter a Password")
- u_p =username+","+password
- myfile.write(str(u_p))
- myfile.write("/n")
- create = True
- myfile.close()
- def topics():
- print("Type History")
- print("Type Music")
- print("Type Computerscience")
- choice=str(input("Enter what choice you want"))
- if choice in["History" , "history"]:
- history()
- if choice in["Music" , "music"]:
- music()
- if choice in["Computerscience" , "computerscience"]:
- computerscience()
- def History():
- print("Type Easy for Easy Mode")
- print("Type Medium for Medium Mode")
- print("Type Hard for Hard Mode")
- choice1=str(input("Enter a Choice"))
- score =0
- if choice1 in ["Easy" , "easy"]:
- Q1 = False
- Q2 = False
- Q3 = False
- Q4 = False
- Q5 = False
- while Q1 == False:
- print("Question 1: When did WW1 begin?")
- print("Type1 for 1914")
- print("Type2 for 1925")
- A1 = ("Input a Year")
- if A1 in["1","2"]:
- Q1 = True
- else:
- print ("Try Again")
- while Q2 == False:
- print("Question 2: When did WW2 begin?")
- print("Type1 for 1934")
- print("Type2 for 1939")
- A2 = ("Input a Number")
- if A2 in["1","2"]:
- Q2 = True
- else:
- print ("Try Again")
- while Q3 == False:
- print("Question 3: In what country was Adolf HItler born in?")
- print("Type1 for Austria")
- print("Type2 for Germany")
- A3 = ("Input a Number")
- if A3 in["1","2"]:
- Q3 = True
- else:
- print ("Try Again")
- while Q4 == False:
- print("Question 4: What Year was the Battle of Hastings?")
- print("Type1 for 1066")
- print("Type2 for 1096")
- A4 = ("Input a Number")
- if A4 in["1","2"]:
- Q4 = True
- else:
- print ("Try Again")
- while Q5 == False:
- print("Question 5: What type of flower is worn on Remeberance Day in Britain?")
- print("Type1 for Poppies")
- print("Type2 for Tulips")
- A5 = ("Input a Number")
- if A5 in["1","2"]:
- Q5 = True
- else:
- print ("Try Again")
- else:
- if A1 =="1":
- score = score+1
- if A2 =="2":
- score = score+1
- if A3 =="2":
- score = score+1
- if A4 =="1":
- score = score+1
- if A5 =="1":
- score = score+1
- print("You got" ,score,"/5")
- print("Your Percentage is",score/5*100,"X")
- elif choice1 in ["Medium" , "medium"]:
- Q1 = False
- Q2 = False
- Q3 = False
- Q4 = False
- Q5 = False
- while Q1 == False:
- print("Question 1: When did WW1 begin?")
- print("Type1 for 1920")
- print("Type2 for 1934")
- print("Type3 for 1914")
- A1 = ("Input a Number")
- if A1 in["1","2","3"]:
- Q1 = True
- else:
- print ("Try Again")
- while Q2 == False:
- print("Question 2: When did WW2 begin?")
- print("Type1 for 1920")
- print("Type2 for 1923")
- print("Type3 for 1939")
- A2 = ("Input a Number")
- if A2 in["1","2","3"]:
- Q2 = True
- else:
- print ("Try Again")
- while Q3 == False:
- print("Question 3: In what country was Adolf HItler born in?")
- print("Type1 for Austria")
- print("Type2 for Germany")
- print("Type3 for France")
- A3 = ("Input a Number")
- if A3 in["1","2","3"]:
- Q3 = True
- else:
- print ("Try Again")
- while Q4 == False:
- print("Question 4: What Year was the Battle of Hastings?")
- print("Type1 for 1070")
- print("Type2 for 1066")
- print("Type2 for 1096")
- A4 = ("Input a Number")
- if A4 in["1","2","3"]:
- Q4 = True
- else:
- print ("Try Again")
- while Q5 == False:
- print("Question 5: What type of flower is worn on Remeberance Day in Britain?")
- print("Type1 for Tulips")
- print("Type2 for Poppies")
- print("Type3 for Daisys ")
- A5 = ("Input a Number")
- if A5 in["1","2","3"]:
- Q5 = True
- else:
- print ("Try Again")
- else:
- if A1 =="3":
- score = score+1
- if A2 =="3":
- score = score+1
- if A3 =="1":
- score = score+1
- if A4 =="2":
- score = score+1
- if A5 =="2":
- score = score+1
- print("You got" ,score,"/5")
- print("Your Percentage is",score/5*100,"X")
- elif choice1 in ["Hard" , "hard"]:
- Q1 = False
- Q2 = False
- Q3 = False
- Q4 = False
- Q5 = False
- while Q1 == False:
- print("Question 1: When did WW1 begin?")
- print("Type1 for 1920")
- print("Type2 for 1934")
- print("Type3 for 1940")
- print("Type3 for 1914")
- A1 = ("Input a Number")
- if A1 in["1","2","3","4"]:
- Q1 = True
- else:
- print ("Try Again")
- while Q2 == False:
- print("Question 2: When did WW2 begin?")
- print("Type1 for 1920")
- print("Type2 for 1923")
- print("Type3 for 1939")
- print("Type3 for 1929")
- A2 = ("Input a Number")
- if A2 in["1","2","3","4"]:
- Q2 = True
- else:
- print ("Try Again")
- while Q3 == False:
- print("Question 3: In what country was Adolf HItler born in?")
- print("Type1 for England")
- print("Type2 for Austria")
- print("Type3 for Germany")
- print("Type4 for France")
- A3 = ("Input a Number")
- if A3 in["1","2","3","4"]:
- Q3 = True
- else:
- print ("Try Again")
- while Q4 == False:
- print("Question 4: What Year was the Battle of Hastings?")
- print("Type1 for 1066")
- print("Type2 for 1084")
- print("Type2 for 1096")
- print("Type3 for 1070")
- A4 = ("Input a Number")
- if A4 in["1","2","3","4"]:
- Q4 = True
- else:
- print ("Try Again")
- while Q5 == False:
- print("Question 5: What type of flower is worn on Remeberance Day in Britain?")
- print("Type1 for Tulips")
- print("Type2 for Poppies")
- print("Type3 for Lopels ")
- print("Type3 for Daisys")
- A5 = ("Input a Number")
- if A5 in["1","2","3",4]:
- Q5 = True
- else:
- print ("Try Again")
- else:
- if A1 =="4":
- score = score+1
- if A2 =="3":
- score = score+1
- if A3 =="2":
- score = score+1
- if A4 =="1":
- score = score+1
- if A5 =="2":
- score = score+1
- print("You got" ,score,"/5")
- print("Your Percentage is",score/5*100,"X")
- else:
- print("Invalid Choice")
- def Music():
- print("Type Easy for Easy Mode")
- print("Type Medium for Medium Mode")
- print("Type Hard for Hard Mode")
- choice1=str(input("Enter a Choice"))
- score =0
- if choice1 in ["Easy" , "easy"]:
- Q1 = False
- Q2 = False
- Q3 = False
- Q4 = False
- Q5 = False
- while Q1 == False:
- print("Question 1: What is pitch?")
- print("Type1 for How high or low something is")
- print("Type2 for How loud or soft something is")
- A1 = ("Input a Number")
- if A1 in["1","2"]:
- Q1 = True
- else:
- print ("Try Again")
- while Q2 == False:
- print("Question 2: What is crescedo?")
- print("Type1 for Gradually getting quiter")
- print("Type2 for Gradually getting softer")
- A2 = ("Input a Number")
- if A2 in["1","2"]:
- Q2 = True
- else:
- print ("Try Again")
- while Q3 == False:
- print("Question 3: What is Fortissimo?")
- print("Type1 for Very Quiet")
- print("Type2 for Very Low")
- A3 = ("Input a Number")
- if A3 in["1","2"]:
- Q3 = True
- else:
- print ("Try Again")
- while Q4 == False:
- print("Question 4: What is tempo?")
- print("Type1 for how fast or slow something is")
- print("Type2 for the quality of a tone")
- A4 = ("Input a Number")
- if A4 in["1","2"]:
- Q4 = True
- else:
- print ("Try Again")
- while Q5 == False:
- print("Question 5: What is Rhythm?")
- print("Type1 for the study pulse of number")
- print("Type2 for 3 or more notes played at the same time")
- A5 = ("Input a Number")
- if A5 in["1","2"]:
- Q5 = True
- else:
- print ("Try Again")
- else:
- if A1 =="1":
- score = score+1
- if A2 =="2":
- score = score+1
- if A3 =="2":
- score = score+1
- if A4 =="1":
- score = score+1
- if A5 =="1":
- score = score+1
- print("You got" ,score,"/5")
- print("Your Percentage is",score/5*100,"X")
- elif choice1 in ["Medium" , "medium"]:
- Q1 = False
- Q2 = False
- Q3 = False
- Q4 = False
- Q5 = False
- while Q1 == False:
- print("Question 1: When did WW1 begin?")
- print("Type1 for 1920")
- print("Type2 for 1934")
- print("Type3 for 1914")
- A1 = ("Input a Number")
- if A1 in["1","2","3"]:
- Q1 = True
- else:
- print ("Try Again")
- while Q2 == False:
- print("Question 2: When did WW2 begin?")
- print("Type1 for 1920")
- print("Type2 for 1923")
- print("Type3 for 1939")
- A2 = ("Input a Number")
- if A2 in["1","2","3"]:
- Q2 = True
- else:
- print ("Try Again")
- while Q3 == False:
- print("Question 3: In what country was Adolf HItler born in?")
- print("Type1 for Austria")
- print("Type2 for Germany")
- print("Type3 for France")
- A3 = ("Input a Number")
- if A3 in["1","2","3"]:
- Q3 = True
- else:
- print ("Try Again")
- while Q4 == False:
- print("Question 4: What Year was the Battle of Hastings?")
- print("Type1 for 1070")
- print("Type2 for 1066")
- print("Type2 for 1096")
- A4 = ("Input a Number")
- if A4 in["1","2","3"]:
- Q4 = True
- else:
- print ("Try Again")
- while Q5 == False:
- print("Question 5: What type of flower is worn on Remeberance Day in Britain?")
- print("Type1 for Tulips")
- print("Type2 for Poppies")
- print("Type3 for Daisys ")
- A5 = ("Input a Number")
- if A5 in["1","2","3"]:
- Q5 = True
- else:
- print ("Try Again")
- else:
- if A1 =="3":
- score = score+1
- if A2 =="3":
- score = score+1
- if A3 =="1":
- score = score+1
- if A4 =="2":
- score = score+1
- if A5 =="2":
- score = score+1
- print("You got" ,score,"/5")
- print("Your Percentage is",score/5*100,"X")
- elif choice1 in ["Hard" , "hard"]:
- Q1 = False
- Q2 = False
- Q3 = False
- Q4 = False
- Q5 = False
- while Q1 == False:
- print("Question 1: When did WW1 begin?")
- print("Type1 for 1920")
- print("Type2 for 1934")
- print("Type3 for 1940")
- print("Type3 for 1914")
- A1 = ("Input a Year")
- if A1 in["1","2","3","4"]:
- Q1 = True
- else:
- print ("Try Again")
- while Q2 == False:
- print("Question 2: When did WW2 begin?")
- print("Type1 for 1920")
- print("Type2 for 1923")
- print("Type3 for 1939")
- print("Type3 for 1929")
- A2 = ("Input a Number")
- if A2 in["1","2","3","4"]:
- Q2 = True
- else:
- print ("Try Again")
- while Q3 == False:
- print("Question 3: In what country was Adolf HItler born in?")
- print("Type1 for England")
- print("Type2 for Austria")
- print("Type3 for Germany")
- print("Type4 for France")
- A3 = ("Input a Number")
- if A3 in["1","2","3","4"]:
- Q3 = True
- else:
- print ("Try Again")
- while Q4 == False:
- print("Question 4: What Year was the Battle of Hastings?")
- print("Type1 for 1066")
- print("Type2 for 1084")
- print("Type2 for 1096")
- print("Type3 for 1070")
- A4 = ("Input a Number")
- if A4 in["1","2","3","4"]:
- Q4 = True
- else:
- print ("Try Again")
- while Q5 == False:
- print("Question 5: What type of flower is worn on Remeberance Day in Britain?")
- print("Type1 for Tulips")
- print("Type2 for Poppies")
- print("Type3 for Lopels ")
- print("Type3 for Daisys")
- A5 = ("Input a Number")
- if A5 in["1","2","3","4"]:
- Q5 = True
- else:
- print ("Try Again")
- else:
- if A1 =="4":
- score = score+1
- if A2 =="3":
- score = score+1
- if A3 =="2":
- score = score+1
- if A4 =="1":
- score = score+1
- if A5 =="2":
- score = score+1
- print("You got" ,score,"/5")
- print("Your Percentage is",score/5*100,"X")
- else:
- print("Invalid Choice")
- menu = False
- while menu == False:
- print("***********************")
- print("Welcome to My Quiz")
- print("You must register first")
- details(),
- topics()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement