python quiz

Solutions on MaxInterview for python quiz by the best coders in the world

showing results for - "python quiz"
Fabian
13 Jan 2021
1score = 0
2score = int(score)
3
4#Ask user for their name
5name = input("What is your name?")
6name = name.title()
7print("""Hello {}, welcome to Quiz night! 
8You will be presented with 5 questions.
9Enter the appropriate number to answer the question
10Good luck!""".format(name))
11
12#Question1
13print("""Question here
141.  
152.  
163.  
174. """)
18
19answer1 = "correct number here"
20response1 = input("Your answer is: ")
21
22if (response1 != answer1):
23    print("Sorry, that is incorrect!")
24else:
25    print("Well done! " + response1 + " is correct!")
26    score = score + 1
27
28print("Your current score is " + str(score) + " out of 5")
29
30#Question2
31print("""What is the name of the town your character lives in before The Great War?
321. Diamond City 
332. Sanctuary Hills 
343. Concord 
354. The Glowing Sea""")
36
37answer2 = "correct number here"
38response2 = input("Your answer is:")
39
40if (response2 != answer2):
41    print("Sorry, that is incorrect!")
42else:
43    print("Well done! " + response2 + " is correct!")
44    score = score + 1
45
46print("Your current score is " + str(score) + " out of 5")
47
48#Question3
49print("""Question here
501.  
512.  
523.  
534. """)
54
55answer3 = "correct number here"
56response3 = input("Your answer is:")
57
58if (response3 != answer3):
59    print("Sorry, that is incorrect!")
60else:
61    print("Well done! " + response3 + " is correct!")
62    score = score + 1
63
64print("Your current score is " + str(score) + " out of 5")
65
66#Question4
67print("""Question here
681. 
692. 
703. 
714. """)
72
73answer4 = "correct number here"
74response4 = input("Your answer is:")
75
76if (response4 != answer4):
77    print("Sorry, that is incorrect!")
78else:
79    print("Well done! " + response4 + " is correct!")
80    score = score + 1
81
82print("Your current score is " + str(score) + " out of 5")
83
84#Question5
85print("""Question here
861. False
872. True""")
88
89answer5 = "correct number here"
90response5 = input("Your answer is:")
91
92if (response5 != answer5):
93    print("Sorry, that is incorrect!")
94else:
95    print("Well done! " + response5 + " is correct!")
96    score = score + 1
97
98print("Your total score is " + str(score) + " out of 5")
99print("Thank you for playing {}, goodbye!".format(name))
Domenico
25 Feb 2018
1a = [10, 20]
2b = a
3b += [30, 40]
4print(a)
5print(b)
Ewen
13 Sep 2016
1print("Your question")
2Answer = input("Answer: ")
3if Answer == "Your answer":
4  print("Wow! You got it!")
queries leading to this page
python quizzesshow answer quiz pythonpython quiz with scorecreate quiz game with answers python likepython built in functions quizquizlet quizes pythonmake a quiz pythonpython quiz programs quiz pythoncreate quiz with answers python like python quiz answersquizz pythonpython list quizpython beginner basics quizpython score codepython 3 quiz and answerspython quiz question with answerhow to make a quiz application in pythonpython quiz gamespython concepts quizpython quizzezdefine quiz pythonpython quiz applicationpython quizspython quizizzfree python quizezhow good am i at python quizquiz application in python codepython quizepython programming quizpython quiz questionsquiz python coepython quiz preperationhow to code a quiz in pythonpython quizquiz pythonmake a quiz on pythononline python quizpython project quizhow to create quiz in python quiz game pythonpython quiz with answersquiz application in pythonpython quiz projectpython quiz functionsquiz about functions pythonquize python control statementpython quiz answer storespython quiz for beginnerspython quizzdoing python quizpython quiz templatepython random quiz python quiz onlinehow to make quiz app in pythonpython quiz for functionpython quiz programsimple quiz using pythonhow make python quizpython quiz packagepython quiz and keep scorequiz in pythoncreate quiz with answers pythonquiz python codedaily python quizpython basics quizpython quizeshow make a quiz pythonmake a python quiz and keep scorepython quiz fix codepython quiz questions with answersquiz program in pythonhow to create a quiz application in pythonhow to make a quiz in pythonpython score systemquiz generator pythonpython quiz codeonline python quizespython quiz