Create a QUIZ GAME with Python 💯

Поделиться
HTML-код
  • Опубликовано: 22 ноя 2022
  • #python #tutorial #course
    Python quiz game
    questions = ("How many elements are in the periodic table?: ",
    "Which animal lays the largest eggs?: ",
    "What is the most abundant gas in Earth's atmosphere?: ",
    "How many bones are in the human body?: ",
    "Which planet in the solar system is the hottest?: ")
    options = (("A. 116", "B. 117", "C. 118", "D. 119"),
    ("A. Whale", "B. Crocodile", "C. Elephant", "D. Ostrich"),
    ("A. Nitrogen", "B. Oxygen", "C. Carbon-Dioxide", "D. Hydrogen"),
    ("A. 206", "B. 207", "C. 208", "D. 209"),
    ("A. Mercury", "B. Venus", "C. Earth", "D. Mars"))
    answers = ("C", "D", "A", "A", "B")
    guesses = []
    score = 0
    question_num = 0
    for question in questions:
    print("----------------------")
    print(question)
    for option in options[question_num]:
    print(option)
    guess = input("Enter (A, B, C, D): ").upper()
    guesses.append(guess)
    if guess == answers[question_num]:
    score += 1
    print("CORRECT!")
    else:
    print("INCORRECT!")
    print(f"{answers[question_num]} is the correct answer")
    question_num += 1
    print("----------------------")
    print(" RESULTS ")
    print("----------------------")
    print("answers: ", end="")
    for answer in answers:
    print(answer, end=" ")
    print()
    print("guesses: ", end="")
    for guess in guesses:
    print(guess, end=" ")
    print()
    score = int(score / len(questions) * 100)
    print(f"Your score is: {score}%")

Комментарии • 163

  • @BroCodez
    @BroCodez  Год назад +107

    questions = ("How many elements are in the periodic table?: ",
    "Which animal lays the largest eggs?: ",
    "What is the most abundant gas in Earth's atmosphere?: ",
    "How many bones are in the human body?: ",
    "Which planet in the solar system is the hottest?: ")
    options = (("A. 116", "B. 117", "C. 118", "D. 119"),
    ("A. Whale", "B. Crocodile", "C. Elephant", "D. Ostrich"),
    ("A. Nitrogen", "B. Oxygen", "C. Carbon-Dioxide", "D. Hydrogen"),
    ("A. 206", "B. 207", "C. 208", "D. 209"),
    ("A. Mercury", "B. Venus", "C. Earth", "D. Mars"))
    answers = ("C", "D", "A", "A", "B")
    guesses = []
    score = 0
    question_num = 0
    for question in questions:
    print("----------------------")
    print(question)
    for option in options[question_num]:
    print(option)
    guess = input("Enter (A, B, C, D): ").upper()
    guesses.append(guess)
    if guess == answers[question_num]:
    score += 1
    print("CORRECT!")
    else:
    print("INCORRECT!")
    print(f"{answers[question_num]} is the correct answer")
    question_num += 1
    print("----------------------")
    print(" RESULTS ")
    print("----------------------")
    print("answers: ", end="")
    for answer in answers:
    print(answer, end=" ")
    print()
    print("guesses: ", end="")
    for guess in guesses:
    print(guess, end=" ")
    print()
    score = int(score / len(questions) * 100)
    print(f"Your score is: {score}%")

    • @netuwu2711
      @netuwu2711 Год назад +2

      nice

    • @adam-vip
      @adam-vip Год назад +2

      👍👍👍

    • @imyourdadsorry2167
      @imyourdadsorry2167 Год назад

      Thank you so much

    • @benjaminjohnpabroquez8012
      @benjaminjohnpabroquez8012 Год назад

      questions = ("How many elements are in the periodic table?: ",
      "Which animal lays the largest eggs?: ",
      "What is the most abundant gas in Earth's atmosphere?: ",
      "How many bones are in the human body?: ",
      "Which planet in the solar system is the hottest?: ")
      options = (("A. 116", "B. 117", "C. 118", "D. 119"),
      ("A. Whale", "B. Crocodile", "C. Elephant", "D. Ostrich"),
      ("A. Nitrogen", "B. Oxygen", "C. Carbon-Dioxide", "D. Hydrogen"),
      ("A. 206", "B. 207", "C. 208", "D. 209"),
      ("A. Mercury", "B. Venus", "C. Earth", "D. Mars"))
      answers = ("C", "D", "A", "A", "B")
      guesses = []
      score = 0
      for i, question in enumerate(questions):
      print(f"{question}")
      for option in options[i]:
      print(option)
      guess = input("Enter (A, B, C, D): ").upper()
      guesses.append(guess)
      if guess == answers[i]:
      score += 1
      print("CORRECT!")
      else:
      print(f"INCORRECT! {answers[i]} is the correct answer")
      print("----------------------")
      print("RESULTS")
      print("----------------------")
      print(f"Answers: {' '.join(answers)}")
      print(f"Guesses: {' '.join(guesses)}")
      print(f"Your score is: {int(score / len(questions) * 100)}%")

    • @ianthoka3530
      @ianthoka3530 Год назад

      Can u please get through me i need help serious
      I need to develop a trading plan using the quiz and also insert a scenario for each question

  • @mukesh_awale
    @mukesh_awale Год назад +5

    You are truly awesome,👌
    Please make this quiz game with gui 🙏

  • @idontstudyforamidterm1069
    @idontstudyforamidterm1069 9 месяцев назад +12

    this was fun as heck to follow tysm you literally are one of the reasons i discovered that i love coding and cs but they were presented to me badly by uni and some people who code or wtv .. i really appreciate u and i appreciate any instructor or just any coder who keep it chill and doesnt take things too seriously or make it seem complex when it literally isnt

  • @starwyvern010
    @starwyvern010 Месяц назад

    I appreciate how easy you make it to understand these concepts - thanks!!

  • @greivinvenegas
    @greivinvenegas 5 месяцев назад

    The video os awesome, and ill continue to enjoy your content, but the channel name is the greatest idea EVER 🎉

  • @craftrumzen2393
    @craftrumzen2393 Год назад +47

    Nice, I'm early to watch Giga Chad coding ☕🗿

  • @mayukikomatsu4471
    @mayukikomatsu4471 Год назад +15

    Hello! You are so cool to these videos, they are really useful and I can learn so much about coding and fun stuff. I'm fairly new to this channel, so I'm not sure if I can ask you something: Could you do a Battleship game in Java? Or is it hard to do? It's so fun to watch you write these games in different programming languages.
    Well, anyways thank you for these guide videos, I'll be sure to watch them all(already watched a few). And wish you all the best!!
    Your videos always makes me want to eat pizza🤤, I don't know why 😁

  • @francisjacquart9618
    @francisjacquart9618 10 месяцев назад

    WOW! IMPRESSIVE! I WILL HAVE TO RESTUDY IN DEPTH THE LOGICS OF YOUR CODE, BUT I AM REALLY IMPRESSED BY THE ELEGANCE OF YOUR PROGRAM!

  • @Philippines91037
    @Philippines91037 Год назад +3

    Thanks, Now I Can Make A Python Quiz Test. You're And Awesome Coder.😎👍

  • @ntombi-yensimbinarrates7297
    @ntombi-yensimbinarrates7297 Год назад +1

    This is so dope. Thank you. I want to create a Buzzfeed-like game for a client. This is a great template to start with. Thank you.

  • @alooy333
    @alooy333 7 месяцев назад

    This video was really good. I learned a lot. thanks

  • @mrpadz2760
    @mrpadz2760 Год назад +1

    Thanks for teaching

  • @jessicaferreira_fjes
    @jessicaferreira_fjes Год назад

    This help me a lot!!! Thank you!!

  • @PedroRodriguez-fv6sc
    @PedroRodriguez-fv6sc Год назад +1

    Hey man, great work. You got a like and a subscriber right away.

  • @X-manGamez
    @X-manGamez Год назад

    nice tutorial. good work!

  • @zabehullahalizadeh2310
    @zabehullahalizadeh2310 Год назад +3

    Thank you so much Bro Code. Can you make some python projects for beginners . Please

  • @kszoknyik
    @kszoknyik Год назад

    sir, you are godsent! thank you for your videos, you make it so easy to understand.

  • @kandukurisrinivasarao295
    @kandukurisrinivasarao295 Год назад +1

    Every tutorial is usefull. You have made so many videos in Python .But make a GUI image viewer in Python.

  • @DiamondMan1
    @DiamondMan1 Год назад +9

    this is gonna be so useful im glad i found this channel
    bc of this channel my brother also got into coding

    • @anmolkhatiwada2348
      @anmolkhatiwada2348 Год назад +15

      well, that's what he does. He makes the bro Code

    • @daveg7388
      @daveg7388 Год назад +1

      @@anmolkhatiwada2348 I see what you did there😂

  • @duongla9014
    @duongla9014 4 месяца назад

    This video is good it helped me a lot

  • @mnonom_yt381
    @mnonom_yt381 Год назад

    Hello, can you please introduct us to a advanced c tutorial? Like teach us header files, how to make them, how they work. It would be cool for us.

  • @nicksonyosepsitumorang4557
    @nicksonyosepsitumorang4557 4 месяца назад

    So helpful thanks bro

  • @iohanstefanjourney4613
    @iohanstefanjourney4613 Год назад

    I would love to see a tutorial on web scraping

  • @haidaral-ajmi9878
    @haidaral-ajmi9878 Год назад

    Thank you for your help ☺️

  • @sfSanuga
    @sfSanuga Год назад +1

    Glad to see you brother

  • @prabuddhapal
    @prabuddhapal Год назад +1

    Brother this thing I wanted to create in Java but I can't because I have to learn applets but by watching ur python tutorial it's easy to build in python Thank you so much for your help .

  • @fartlivion9279
    @fartlivion9279 7 месяцев назад

    Nice! I'm wondering how you would do this with both the questions and answers in 1 .txt file that you have in the folder?

  • @hoons6949
    @hoons6949 6 месяцев назад +14

    I cannot understand this video,, but I will carry on

    • @intotheuniverse9170
      @intotheuniverse9170 3 месяца назад

      Then why are you watching this video!!!

    • @realhuman4396
      @realhuman4396 3 месяца назад

      maybe because hes trying to learn? ​@@intotheuniverse9170

    • @Money_Maestro23
      @Money_Maestro23 2 месяца назад

      He has a playlist called "Python Tutorial for Beginners". This video is a part of it. Go from the beginning, not from here.

    • @mohamedcoufi9873
      @mohamedcoufi9873 Месяц назад

      Can I find a job if I learned python coding language? ​@@Money_Maestro23

  • @Mixmers
    @Mixmers Год назад

    thanks for your service

  • @appigoud3620
    @appigoud3620 Год назад

    bro please do videos on beginners projects in python👍🙏

  • @ellana_de
    @ellana_de Год назад +3

    Hi. I plan to loop this quiz so that if they want to play again they can play. But is there a way to randomize the question on the next game?

  • @DrRajibShahriar
    @DrRajibShahriar 7 месяцев назад

    🥰this guy is awesome for new coders

  • @oporka4656
    @oporka4656 Год назад

    best Channal ever

  • @user-dk2uq1ok1t
    @user-dk2uq1ok1t 9 месяцев назад

    i love this

  • @ryanrajesh6861
    @ryanrajesh6861 Год назад

    How did you make the words at the bottom bright green?

  • @spkmusic3826
    @spkmusic3826 Год назад

    Keep helping well done

  • @adamartinmusic
    @adamartinmusic 5 месяцев назад

    THANK YOU sooo much. I have a better understanding. It made my professor uncomfortable that I am using you as a resource. But he doesnt have a clue on python

  • @-0-__-0-
    @-0-__-0- Год назад +25

    You can also use a dict to contain each question, its choices, answer and its index all at once in each index so its like,
    questions = {
    question_01 : {question, choices, answer},
    question_02 : .....
    }
    It would make anything else easier later.

    • @begadkirat1680
      @begadkirat1680 Год назад +1

      Thats how i did it

    • @bobhogen8831
      @bobhogen8831 10 месяцев назад

      Hi @-0__-0-, I know this comment was from awhile ago but I was wondering if you could explain why this would make it easier later?
      I am brand new to trying coding out and I haven't really tried out what Bro Code made in the video. I am just curious for the most part.
      Thank you for your time! Have a great rest of your day.

    • @begadkirat1680
      @begadkirat1680 10 месяцев назад

      @@bobhogen8831 bcz having each question relate to only a specific Set of answers is easier to deal with and easily sustainable and has lower chances of errors since you dont have to create variables just for the sole reason of indexing

    • @-0-__-0-
      @-0-__-0- 10 месяцев назад +1

      @bobhogen8831
      Comprehensive data grouping: It efficiently groups various data elements, such as questions, answers, types, and options, within the same dictionary.
      By grouping all relevant data of a question, you now have an easy and direct access to specific data related questions by accessing only the dictionary item itself.
      Efficient Data Integration: This approach adeptly consolidates diverse data components like questions, answers, types, and options within a single dictionary.

    • @bobhogen8831
      @bobhogen8831 10 месяцев назад

      @@-0-__-0- Thank you so much!

  • @Karen00586
    @Karen00586 9 месяцев назад

    Thank you for teaching coding

  • @miniadriel
    @miniadriel Год назад

    can you please make this in in tkinter ? it will be soo cool thanks :)

  • @yoyogoodstuff
    @yoyogoodstuff Год назад

    thanks!

  • @user-mg4kw8zp4p
    @user-mg4kw8zp4p 11 месяцев назад

    Thanks bro

  • @xancy8640
    @xancy8640 Год назад

    Nice Bro!

  • @Storm2_0
    @Storm2_0 5 месяцев назад +2

    Can you make gui version of this?

  • @uknownytbr158
    @uknownytbr158 Год назад

    Thank you

  • @teksneeze9566
    @teksneeze9566 Год назад

    thanx brooooo

  • @ShyannKeyshelle
    @ShyannKeyshelle Год назад

    Hey Bro, first thanks for this video, all your videos they are really helpful. Now the issues is all of my options show up under my last question. I don't understand why. Help?

  • @BEPULVEDIODARSLAR
    @BEPULVEDIODARSLAR Год назад

    HI! BRO CODE I'M LEARNING YOUR VEDIOS AND I'M LEARNING PROGRAMMS. BUT CAN YOU CREATE GAMES FOR EXAMPLE SIMPLE FOOTBALL GAMES AND SIMPLE RACES!! TELL MME

  • @shetty5121
    @shetty5121 6 месяцев назад

    In which software whe shuld do this in idle python itself right?

  • @GoldPraiseUnigwe
    @GoldPraiseUnigwe 4 месяца назад

    Which compiler can I use on my laptop

  • @Shohjahon149
    @Shohjahon149 Год назад

    Will you make videos about node js?

  • @hil6517
    @hil6517 Год назад +1

    bro when you wrote the questions your keyboard cried for help how did you do that so fast

  • @dhanushkm2104
    @dhanushkm2104 11 месяцев назад

    How do you set the answers for the questions

  • @lautaroalvarez399
    @lautaroalvarez399 Год назад

    thanks

  • @user-eq6qj4zc7n
    @user-eq6qj4zc7n 5 месяцев назад

    I love your quiz game video for Java. Do you have one for Python that uses Tkinter?

  • @muneerabass95
    @muneerabass95 Год назад

    bro can i make this type of quiz game using if else condiition ??

  • @tiwariji9985
    @tiwariji9985 10 месяцев назад

    Awsome Video brother new subscriber added ❤❤
    Plus 101 comment 😅

  • @gabrielabello3339
    @gabrielabello3339 6 месяцев назад

    im curious how do you make this a game? like the app itself

  • @owaisfakih
    @owaisfakih Год назад

    Which version of Python is this and how to download it?

  • @fern112091
    @fern112091 Год назад

    how do you add a player count?

  • @TheGamingDandy
    @TheGamingDandy 9 месяцев назад +1

    Quick question, I followed your code but when it gets to the part at the end where it's printing the answers, it repeats it 5 times instead of having the clean "answers" and then "guesses" format like yours.
    The guesses column does not repeat though, it only gives the 5 singular letters.
    How would I solve that?

    • @jemil8479
      @jemil8479 6 месяцев назад

      Broski did you find any solution to that ?

  • @mohammedisarezwani
    @mohammedisarezwani 10 месяцев назад

    looks a little hard for me !

  • @pandit_deepanshu52
    @pandit_deepanshu52 8 месяцев назад

    Which app or site have u used for this??

  • @rickkk09
    @rickkk09 Год назад

    sheeeesh 🥵

  • @Bacon_editsz
    @Bacon_editsz 4 месяца назад

    Pls make with gui

  • @fly2012able
    @fly2012able Год назад +1

    Very cool! What I am not understand is how you are remember all those codes and when to put () or [] etc… I found myself copy from video to video but cannot really remember all those codes
    Any tips? Website I can use?

    • @matheusgafanhoto8232
      @matheusgafanhoto8232 Год назад

      What i recommend you instead of copying from a video, is to try to create a personal project.
      An easy example would be a console app to show your friends, like a election system or an elevator system, they are complicated but you can make it easy just to try :D

    • @fly2012able
      @fly2012able Год назад

      @@matheusgafanhoto8232
      Thanks for your reply. Here is my problem, I have few projects I want to do but as soon as I open the app to start writing the code I am stuck and don’t know how to start. 🙁🙁

  • @allanadarayan9617
    @allanadarayan9617 8 месяцев назад

    This guy is a real chad

  • @lavieloves1997
    @lavieloves1997 Год назад +1

    Thank you soooo much for this i was so stressing about it cause it was my project and have to submit tomorrow but you saved me 💜💜💜

  • @emanuelfolorunsho9881
    @emanuelfolorunsho9881 9 месяцев назад

    What if you want to use a text file?

  • @craighayward2
    @craighayward2 Год назад

    I keep getting error on guesses.append(guess) is says append has no member

  • @matijacvijovic5712
    @matijacvijovic5712 Год назад

    This video saved my life bro

  • @rotes3106
    @rotes3106 Год назад

    Bro must be working or worked in educational institutions for while you killed that python so quick

  • @jademcshane07jade6
    @jademcshane07jade6 Год назад +2

    Sir, I've watched all youre python course, what should I learn next?

    • @BroCodez
      @BroCodez  Год назад +5

      Data Structures & Algorithms might be good.

    • @jademcshane07jade6
      @jademcshane07jade6 Год назад

      @@BroCodez Ok ty

    • @ramakrishna4092
      @ramakrishna4092 Год назад +1

      @@BroCodez hi sir I have completed c course in your channel . If it's possible for you can you pls do a video on how to return a function pointers in c .
      Thank you for understanding

  • @Priceygames
    @Priceygames 7 месяцев назад

    I think this is the first step to make a workable Flashcard, use set i guess 🤔

  • @letmesolojomama4211
    @letmesolojomama4211 Год назад

    You can still answer the questions with lower case letters(ABCD) and you'll get "CORRECT" every time. So how are you suppose to force the user to use upper case only?

    • @noobdabs1005
      @noobdabs1005 Год назад

      why not lol 😅
      Just do
      if guess.istitle():
      (put the code here)
      else:
      print something to tell the players

  • @tjmns
    @tjmns 8 месяцев назад

    cool. request to expand this tuorial with an option to upload the test score to a MS-SQL-Server database table named Test_Score., for username Michael Thanks.

  • @cooortst
    @cooortst Год назад +2

    if guess == answers[question_num]:
    IndexError: tuple index out of range
    brother i have problem here . Please help me idk why it's dont work :( i do every like in the video. Have a nice day!

  • @user-anonymous012
    @user-anonymous012 3 месяца назад

    🤯

  • @GD_good_
    @GD_good_ 10 месяцев назад

    it's so obvious

  • @IntoTheArmsOfMorpheus
    @IntoTheArmsOfMorpheus 10 месяцев назад

    i just wanted to know how if the user types a different key from [A,B,C,D] . how to make the program ask the question again.
    Thanks for the effort.

    • @jemil8479
      @jemil8479 6 месяцев назад

      Bro i want to know that aswell did you find how to do it ?

  • @vatsvlogs6110
    @vatsvlogs6110 8 месяцев назад

    I was fool .. learning c,c++ and Java.. but not python 🤔

  • @lisam119
    @lisam119 Год назад

    i dont understand. 😭 is it a good idea to hire a private tutor on fiver?

  • @dillonpaul1498
    @dillonpaul1498 Год назад

    you could of shown us how it worked in a display screen.

  • @jokeguy5946
    @jokeguy5946 Год назад +1

    Hey bro how can you make the computer choose random questions?

    • @BroCodez
      @BroCodez  Год назад +3

      random.choice(questions)
      Although you would need to remove every used question and also keep track of the options and correct answers.

    • @jokeguy5946
      @jokeguy5946 Год назад

      @@BroCodez thank bro

  • @gamer310taka9
    @gamer310taka9 Год назад

    when im on the last question and i answer it it just automaticly close\

  • @mindless6732
    @mindless6732 Год назад +1

    i did everything exactly the same and the result is shit. idk why it wont work i've rewatched this video about 14 times and made sure everything down to spacing is the exact same but when i start it it forms nothing but incomprehensible garbage. is there some sort of special setting he did or wut?

  • @wolberfy
    @wolberfy Год назад

    This is strange, Yesterday i made a python program named Venus (idk why i liked the name) and it was a true or false program.

  • @matrixow6511
    @matrixow6511 Год назад +1

    the hottest planet is obviosly Uranus

  • @vatsal6684
    @vatsal6684 7 дней назад +1

    if we make questions and options into tuple we cant add new questions and options in future

  • @AidanFoster-h7c
    @AidanFoster-h7c 14 дней назад

    Has anyone noticed how fast he types...

  • @Gkotsetos13
    @Gkotsetos13 9 месяцев назад +1

    Hey Bro's! New to programming know the basics. I copied this code , create my own questions and I want to upload it to a website to send it for fun to some friends. You know what can i do? THnx!

    • @jemil8479
      @jemil8479 6 месяцев назад

      Bro Did you find how to do it ?

  • @KrashankantSharma6459
    @KrashankantSharma6459 2 месяца назад

    can you plz make a programme when the questions are already written in the word or text format. and the format like -----------------"Question: Who is recognized as the Father of Agricultural Chemistry (World)?
    A) J.V. Liebig
    B) J.W. Leather
    C) V.V. Dokuchaev
    D) J.B. Boussingault
    Answer: A) Justus von Liebig"

  • @user-mf8vv1qz8n
    @user-mf8vv1qz8n 10 месяцев назад

    here's anothere with one more:
    print("Hi, this is a quiz! on math only 6 question")
    total_questions = 6
    correct_answers = 0
    answer1 = input("What is 1 + 1?: ")
    if answer1 == "2":
    print("Correct!")
    correct_answers += 1
    print("---------")
    else:
    print("Incorrect")
    print("----------")
    answer2 = input("What is 11 x 2 = ?: ")
    if answer2 == "22":
    print("Correct!")
    correct_answers += 1
    print("-------")
    else:
    print("Incorrect")
    print("-----------")
    answer3 = input("What is 100/20 x 10 = ?: ")
    if answer3 == "50":
    print("Correct!")
    correct_answers += 1
    print("-------")
    else:
    print("Incorrect")
    print("-----------")
    answer4 = input("What is 40/20 x 300 = ?: ")
    if answer4 == "600":
    print("Correct!")
    correct_answers += 1
    print("-------")
    else:
    print("Incorrect")
    print("-----------")
    answer5 = input("What is a (a x 50 = 150)?: ")
    if answer5 == "3":
    print("Correct!")
    correct_answers += 1
    print("-------")
    else:
    print("Incorrect")
    print("-----------")
    answer6 = input("What is X (X x 300 = 9000)?: ").upper()
    if answer5 == "30":
    print("Correct!")
    correct_answers += 1
    print("-------")
    else:
    print("Incorrect")
    print("-----------")
    score = (correct_answers / total_questions) * 100
    print(f"Your score: {score}%")
    don't copy(pleas don't rost me

  • @user-dj7ic1xs2p
    @user-dj7ic1xs2p Год назад

    1:35

  • @ForRealGD
    @ForRealGD Год назад

    What are you using to type the code?

  • @luffyistheg3092
    @luffyistheg3092 2 месяца назад

    Can someone tell me why it says that there is an indentation error in the line guess = input("Enter (A, B, C, D): ").upper()

  • @upsettingace7776
    @upsettingace7776 Год назад

    Is no one gonna mention how fast this dude is typing? Or this is normal in America

  • @sapnaambedkar6068
    @sapnaambedkar6068 6 месяцев назад

    GIGACODE

  • @pauljnr2470
    @pauljnr2470 23 дня назад

    You make every topic easy to understand. Thanks so much bro!
    questions = ("1. Which country is known as the Land of the Rising Sun? ",
    "2. Which country has the city of Paris as its capital?",
    "3. Which country is home to the Amazon Rainforest?",
    "4. Which country is famous for its pyramids?",
    "5. Which country is an island nation in the Indian Ocean?",
    "6. Which country is known for the Great Wall?",
    "7. Which country is home to the city of Sydney?",
    "8. Which country has the Eiffel Tower?",
    "9. Which country is known for its maple syrup?",
    "10. Which country has the most populous city, Tokyo?")
    options = (("A. South Korea", "B. China", "C. Japan", "D. Vietnam"),
    ("A. Italy", "B. Spain", "C. France", "D. Belgium"),
    ("A. Argentina", "B. Peru", "C. Brazil", "D. Colombia"),
    ("A. Mexico", "B. Saudi Arabia", "C. Egypt", "D. Jordan"),
    ("A. Thailand", "B. Maldives", "C. Sri Lanka", "D. Philippines"),
    ("A. Japan", "B. India", "C. China", "D. Mongolia"),
    ("A. New Zealand", "B. Australia", "C. Canada", "D. South Africa"),
    ("A. Germany", "B. United Kingdom", "C. France", "D. Italy"),
    ("A. Norway", "B. Canada", "C. Sweden", "D. Denmark"),
    ("A. South Korea", "B. India", "C. Japan", "D. China"))
    correct_options = ("C", "C", "C", "C", "B", "C", "B", "C", "B", "C")
    detailed_answers = ("Japan is often referred to as the \"Land of the Rising Sun\".
    In ancient times, "
    "the Japanese believed they were the first to see the sun rise in the East.",
    "Paris, known as \"The City of Light,\" is the capital and largest city of France. "
    "
    Famous for its art, culture, and landmarks like the Eiffel Tower.",
    "The majority of the Amazon Rainforest, about 60%, is located in Brazil. "
    "
    It is the world's largest tropical rainforest and plays a crucial role "
    "in regulating the global climate.",
    "Egypt is renowned for its ancient pyramids, particularly the Pyramids of Giza. "
    "
    They are among the most famous and enduring symbols of ancient Egyptian civilization.",
    "The Maldives is an island nation in the Indian Ocean.
    It is known for its stunning coral reefs, "
    "clear blue waters, and luxury resorts.",
    "The Great Wall of China is a series of fortifications built along the northern borders of "
    "China to protect against invasions.
    It is one of the most iconic symbols of China.",
    "Sydney is the largest city in Australia and is famous for its Sydney Opera House, "
    "Harbour Bridge, and beautiful beaches.",
    "The Eiffel Tower is a wrought-iron lattice tower located in Paris, France.
    It was "
    "constructed in 1889 and has since become a global icon of France and one of the most "
    "recognizable structures in the world.",
    "Canada is the world's largest producer of maple syrup, especially in the province of Quebec, "
    "which accounts for about 70% of the world's supply.",
    "Tokyo, the capital city of Japan, is the most populous metropolitan area in the world. "
    "
    Known for its blend of traditional culture and cutting-edge technology.")
    question_index = 0
    choices = []
    score = 0
    passed = 0
    failed = 0
    for question in questions:
    print(question)
    for option in options[question_index]:
    print(option)
    choice = input("Enter A, B, C, or D: ").upper()
    choices.append(choice)
    if choice == correct_options[question_index]:
    print(f"{choice} is correct!")
    print(detailed_answers[question_index])
    score += 1
    passed += 1
    else:
    print(f"{choice} is incorrect!")
    print(detailed_answers[question_index])
    score -= 1
    failed += 1
    question_index += 1
    print()
    print("- - - - - -")
    print("- -!RESULT!- -")
    print("- - - - - -")
    total_score = score / len(questions) * 100
    print("Your answers are: ", end=" ")
    for choice in choices:
    print(choice, end=" ")
    print()
    print("The correct answers are: ", end=" ")
    for correct_option in correct_options:
    print(correct_option, end=" ")
    print()
    print(f"Your total score is {total_score}%")
    print(f"You answered {passed} questions correctly!")
    print(f"You failed {failed} questions")
    if total_score < 50:
    print("Failed! Repeat the quiz.")
    elif total_score < 95:
    print("Passed!")
    else:
    print("Excellent! Keep it up.")

  • @kenny_eats_many
    @kenny_eats_many Год назад

    Uhh oh umm, what do I say, can I get suggestions please