Building a Multiple Choice Quiz | Python | Tutorial 32

///Building a Multiple Choice Quiz | Python | Tutorial 32

Building a Multiple Choice Quiz | Python | Tutorial 32

FavoriteLoadingAdd to favorites

Giraffe Academy is rebranding! I’ve decided to re-focus the brand of this channel to highlight myself as a developer and teacher! The newly minted Mike Dane channel will have all the same content, with more to come in the future!

Source Code –

This video is one in a series of videos where we’ll be looking at programming in python. The course is designed for new programmers, and will introduce common programming topics using the python language.

Throughout the course we’ll be looking at various topics including variables, lists, tuples, loops, conditionals, object orientation, and much more.

If you’re enjoying Giraffe Academy and want to invest in our future, consider leaving a contribution

Links:
Website –
Facebook –
Twitter –

source

By |2020-05-09T03:29:47+00:00May 9th, 2020|Python Video Tutorials|26 Comments

26 Comments

  1. Keith Morgan May 9, 2020 at 3:29 am - Reply

    This is perfect. Works great. Going to use this to analyse CSTA standards in my lessons. Hey, what software do you use to superimpose youself onto PyCharm screen? Thank you!!

  2. Texno OLAM May 9, 2020 at 3:29 am - Reply

    Hi Mike. Thanks for your teaching! Which code editor are you using? The same function did not run in Atom editor…

  3. Magdalena Parra May 9, 2020 at 3:29 am - Reply

    I need to biuld a quiz that doesn't have right or wrong answers but rather different points acording to the answer that need to be summed at the end, How could I do that?

  4. Ana Pacheco May 9, 2020 at 3:29 am - Reply

    I am currently trying to do a who wants to be a millionaire game. I of course have to validate what the user inputs. He gets to choose from choices A, B, C, or D, how would I be able to validate this? I normally use the while loop, but I don’t want to do something like this: while answer!= “a” or answer!=“A” or answer!=“b” or answer!=“B”…….. how would I be able to validate this? I am very new to programming, so excuse me hahahaha

  5. Melisa Asadi May 9, 2020 at 3:29 am - Reply

    which version is it

  6. Daniel Morales May 9, 2020 at 3:29 am - Reply

    How could I make the questions come out randomly. I've imported the random modue, but I'm not sure if you could do this in the class file or the exam file?

  7. Kevin Bondovic May 9, 2020 at 3:29 am - Reply

    Great tutorial, but what gui are you using?

  8. Moddy AB May 9, 2020 at 3:29 am - Reply

    you are the BEST python teacher EVER:)

  9. ram krishnan May 9, 2020 at 3:29 am - Reply

    Thank you soo much 🍎🍌🍓

  10. TubeOfAlchemy May 9, 2020 at 3:29 am - Reply

    I got the error : NameError: name 'score' is not defined
    How to fix this?

  11. Pranil Raichura May 9, 2020 at 3:29 am - Reply

    Is this built for Python version 3.8 or 3.7?

  12. djStens May 9, 2020 at 3:29 am - Reply

    How would you turn the questions into an android app and make a game out of it? Is that possible through Python?

  13. MD AAMIR SIDDIQUI May 9, 2020 at 3:29 am - Reply

    How to use this in web page

  14. Carson Smith May 9, 2020 at 3:29 am - Reply

    your vidoe dosnt work idiot

  15. Carson Smith May 9, 2020 at 3:29 am - Reply

    mike you are like a brother to me

  16. SPACEUPHORIA May 9, 2020 at 3:29 am - Reply

    Here is my dressed up version of a quiz game. However, I didn't use def statements. If you run this program from OS, you will even see how the OS characters can change colour, and stay separate. Each letter can be a different colour if you like. But you must run the program by double clicking the file you made from here and that's how you can see what the actual, dressed up output looks like. Copy it and run it. Save it as whatever you wish. Double click to run it and see the features you can create. You must import OS, just as you can see here. The last input statement just stops the OS Python file from closing and disappearing, so you can see what happens. Press Enter and the program will close and vanish, until you re open/run it again.

    import os

    tc=(

    'x1b[31m',

    'x1b[32m',

    'x1b[33m',

    'x1b[34m',

    'x1b[35m',

    'x1b[36m',

    'x1b[37m',

    )

    question_prompts1=(

    f'{tc[2]}How many sides does a Triangle have?nn{tc[1]}(a) {tc[2]}four

    sidesn{tc[1]}(b) {tc[2]}three sidesn{tc[1]}(c) {tc[2]}two sides',

    f'{tc[2]}How many sides does a Square have?nn{tc[1]}(a) {tc[2]}

    Two sidesn{tc[1]}(b) {tc[2]}Three sidesn{tc[1]}(c) {tc[2]}Four sides',

    f'{tc[2]}How many sides does a Pentagon have?nn{tc[1]}(a) {tc[2]}

    four sidesn{tc[1]}(b) {tc[2]}five sidesn{tc[1]}(c) {tc[2]}Three sides',

    f'{tc[2]}How many sides does a Hexagon have?nn{tc[1]}(a) {tc[2]}six

    sidesn{tc[1]}(b) {tc[2]}five sidesn{tc[1]}(c) {tc[2]}two sides',

    f'{tc[2]}How many sides does a Octagon have?nn{tc[1]}(a) {tc[2]}four

    sidesn{tc[1]}(b) {tc[2]}six sidesn{tc[1]}(c) {tc[2]}eight sides',

    f'{tc[2]}How many sides does a Dodecagon have?nn{tc[1]}(a) {tc[2]}eight

    sidesn{tc[1]}(b) {tc[2]}three sidesn{tc[1]}(c) {tc[2]}twelve sides',

    f'{tc[2]}How many sides does a Hexadecagon have?nn{tc[1]}(a) {tc[2]}sixteen

    sidesn{tc[1]}(b) {tc[2]}eight sidesn{tc[1]}(c) {tc[2]}six sides'

    )

    prompt=('b','c','b','a','c','c','a')

    score=0

    loop=0

    while loop<=6:

    os.system('cls')

    button=input((tc[1])+'nKnow Your Stuff!nn'+(tc[2])+'Know Your Polygonsnn'+

    question_prompts1[loop]+'nn'+(tc[0])+'READY:'+(tc[1])).strip()

    if button==(prompt[loop]):

    score+=1

    loop+=1

    os.system('cls')

    print(f'n{tc[2]}Know Your Polygonsnn{tc[2]}You got {score}/{len(question_prompts1)}

    questions correct.nCongratulations! Your total Prize Winnings: {tc[1]}${score*100*score:,}.00

    {tc[2]}Dollars.nn{tc[0]}READY:')

    input('nEND OF PROGRAM! Press Enter to quit.')

  17. Red Fire May 9, 2020 at 3:29 am - Reply

    Very good vid but i was wondering why we use in the func (questions) instead of () can u help me figure it out

  18. Ryan Parmelee May 9, 2020 at 3:29 am - Reply

    I'm having a hard time understanding this one.

  19. Adonitoo May 9, 2020 at 3:29 am - Reply

    I want to make a preaty much impossible quiz for eatch awnser the player gets wrong it pops a porn site or somethinh and then send it to my school teachers

  20. Itz Hypex May 9, 2020 at 3:29 am - Reply

    Hi, HaVe YoU AlwAyS WaNtEd To LeArN To cOdE BuT dOn'T kNoW WheRe To StARt??

    I'M FUCKING TIRED OF THIS FUCKING AD I JUST WANT TO WATCH PYTHON VIDEOS

  21. HIDlarissaTERRY May 9, 2020 at 3:29 am - Reply

    Beautiful help! Thank you.

  22. nkululeko njapha May 9, 2020 at 3:29 am - Reply

    i need help in creating this in TKINTER

    print("Welcome To Our Game called Friends Like These")
    print("Created By Star Games")
    rules = input("Press Enter To Read The rules.")
    print("The game only allows three players in each team, so that makes six players per game.")
    print("Each team picks one person on their team they think they know the most and the game prompts the chosen player to answer 10 questions per stage.")
    print("The answers are then mixed with other answers by the game and the other two team members must pick the correct one excluding the chosen one")
    print("The game questions are personal and evaluate how well you know your friends.")
    print("The stages are different, stage 1 is about your Friend, stage 2 is about how well your all know your Maths as a team and stage 3 is about how well your all know South Africa.")
    print("There are two teams and the team that scores the highest score between the two wins")
    print("Each team is given 5 minutes to answer all questions")
    print("Good Luck")
    continue_1 = input("Press Enter To Start the game")

    print("Team A enter you 3 players down below and press enter ")
    team_A_player_1 = input("Enter your first player name from team A: ")
    team_A_player_2 = input("Enter your Second player name from team A: ")
    team_A_player_3 = input("Enter your third player name from team A: ")

    print("Team B enter you 3 players down below and press enter ")
    team_B_player_1 = input("Enter your first player name from team B: ")
    team_B_player_2 = input("Enter your Second player name from team B: ")
    team_B_player_3 = input("Enter your third player name from team B: ")

    print("Welcome To Friends Like These ", team_A_player_1, team_A_player_2, team_A_player_3, " From Team A "," You Will Be versing ", team_B_player_1, team_B_player_2, team_B_player_3, " From Team B.")

    print("Stage 1")

    q1 = "2"
    q2 = "1999"
    q3 = "6000"
    q4 = "25"
    q5 = "132"
    q6 = "20"
    q7 = "25"
    q8 = "8"
    q9 = "10"
    q10 = "256"
    answer = ""
    ans_count = 0
    point = 0

    answer = input("What is 1 + 1 ?")
    if answer == q1:
    print("Press enter to continue")
    ans_count =ans_count + 1
    elif answer != q1 and (""):
    print("Press enter to continue")
    ans_count = ans_count + 0
    answer = input("What is 999.5 * 2 ?")
    if answer == q2:
    print("Press enter to continue")
    ans_count =ans_count + 1
    elif answer != q2
    and (""):
    print("Press enter to continue")
    ans_count = ans_count + 0
    answer = input("What is 500 * 12 ?")
    if answer == q3:
    print("Press enter to continue")
    ans_count =ans_count + 1
    elif answer != q3 and (""):
    print("Press enter to continue")
    ans_count = ans_count + 0
    answer = input("What is 5 * 5 ?")
    if answer == q4:
    print("Press enter to continue")
    ans_count =ans_count + 1
    elif answer != q4 and (""):
    print("Press enter to continue")
    ans_count = ans_count + 0
    answer = input("What is 11 * 12 ?")
    if answer == q5:
    print("Press enter to continue")
    ans_count =ans_count + 1
    elif answer != q5 and (""):
    print("Press enter to continue")
    ans_count = ans_count + 0
    answer = input("What is 13 + 7 ?")
    if answer == q6:
    print("Press enter to continue")
    ans_count =ans_count + 1
    elif answer != q6 and (""):
    print("Press enter to continue")
    ans_count = ans_count + 0
    answer = input("What is 5*5*5/5 ?")
    if answer == q7:
    print("Press enter to continue")
    ans_count =ans_count + 1
    elif answer != q7 and (""):
    print("Press enter to continue")
    ans_count = ans_count + 0
    answer = input("What is 64 / 8 ?")
    if answer == q8:
    print("Press enter to continue")
    ans_count =ans_count + 1
    elif answer != q8 and (""):
    print("Press enter to continue")
    ans_count = ans_count + 0
    answer = input("What is 9 + 1 ?")
    if answer == q9:
    print("Press enter to continue")
    ans_count =ans_count + 1
    elif answer != q9 and (""):
    print("Press enter to continue")
    ans_count = ans_count + 0
    answer = input("What is 64 + x + (16*6) + 16 +(8*x) ?")
    if answer == q10:
    print("Press enter to continue")
    ans_count =ans_count + 1
    elif answer != q10 and (""):
    print("Press enter to continue")
    ans_count = ans_count + 0
    point = ans_count
    print("You scored is ",point, "Points")

    siphelelemaphumulo@gamil.com

  23. Manvi Jain May 9, 2020 at 3:29 am - Reply

    i want help for making project. please help me ,guide me about topics for beginners with source code

  24. Job Search Service Team May 9, 2020 at 3:29 am - Reply

    How to launch chatbot created in Python as android app?

  25. Ansh Tewari May 9, 2020 at 3:29 am - Reply

    Can anyone tell why did he create a new file ? Or what’s the function of that new file

Leave A Comment

*