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}%")
@netuwu27112 жыл бұрын
nice
@adam-vip2 жыл бұрын
👍👍👍
@imyourdadsorry2167 Жыл бұрын
Thank you so much
@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 Жыл бұрын
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
@hoons6949 Жыл бұрын
I cannot understand this video,, but I will carry on
@intotheuniverse91709 ай бұрын
Then why are you watching this video!!!
@realhuman43969 ай бұрын
maybe because hes trying to learn? @@intotheuniverse9170
@Money_Maestro238 ай бұрын
He has a playlist called "Python Tutorial for Beginners". This video is a part of it. Go from the beginning, not from here.
@mohamedcoufi98737 ай бұрын
Can I find a job if I learned python coding language? @@Money_Maestro23
@georgeg90253 ай бұрын
Thank you for sharing your coding skill in a very simple and straight forward way. George, South Africa
@idontstudyforamidterm1069 Жыл бұрын
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
@greivinvenegas11 ай бұрын
The video os awesome, and ill continue to enjoy your content, but the channel name is the greatest idea EVER 🎉
@DiamondMan12 жыл бұрын
this is gonna be so useful im glad i found this channel bc of this channel my brother also got into coding
@anmolkhatiwada23482 жыл бұрын
well, that's what he does. He makes the bro Code
@daveg73882 жыл бұрын
@@anmolkhatiwada2348 I see what you did there😂
@francisjacquart9618 Жыл бұрын
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!
@starwyvern0107 ай бұрын
I appreciate how easy you make it to understand these concepts - thanks!!
@PixelCarot-i5f2 ай бұрын
Thanks for helping me learn how to make a a game from python
@craftrumzen23932 жыл бұрын
Nice, I'm early to watch Giga Chad coding ☕🗿
@pauljnr24706 ай бұрын
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.")
@Bro_Tato_Chip11 ай бұрын
Can you make gui version of this?
@anythingADHD17 күн бұрын
This was one of the most helpful codes I have learned yet!!!
@adamartinmusic11 ай бұрын
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
@duongla901410 ай бұрын
This video is good it helped me a lot
@-0-__-0-2 жыл бұрын
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 Жыл бұрын
Thats how i did it
@bobhogen8831 Жыл бұрын
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 Жыл бұрын
@@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- Жыл бұрын
@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 Жыл бұрын
@@-0-__-0- Thank you so much!
@EnolaHolmes-o6h5 ай бұрын
Thank you for your work. You are really cool! I really like your videos!
@new_spirit-f6w23 күн бұрын
Simply amazing❤😊
@ntombi-yensimbinarrates7297 Жыл бұрын
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.
@Philippines910372 жыл бұрын
Thanks, Now I Can Make A Python Quiz Test. You're And Awesome Coder.😎👍
@deborahbee71222 ай бұрын
TYSM, you are single-handedly saving my gpa
@JOANNA-nm9gv5 ай бұрын
Thank you!!! It's very helping when I'm Testing my freind before biology tests :)
@mukesh_awale2 жыл бұрын
You are truly awesome,👌 Please make this quiz game with gui 🙏
@mayukikomatsu44712 жыл бұрын
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 😁
@tomfardell4111 Жыл бұрын
@amung us aming gus
@HarjinderK-c2fАй бұрын
really a nice one man I really appreciate you
@kandukurisrinivasarao2952 жыл бұрын
Every tutorial is usefull. You have made so many videos in Python .But make a GUI image viewer in Python.
@rashidchibvuri20362 ай бұрын
thank u bro for awesome lessons
@alooy333 Жыл бұрын
This video was really good. I learned a lot. thanks
@eagleknight312025 күн бұрын
what about open ended questions, the choice questions I understand but what shoulkd I do for the open ended questions with no choices. thanks
@T_ootie_x_P_atootie Жыл бұрын
sir, you are godsent! thank you for your videos, you make it so easy to understand.
@naveenlal250913 күн бұрын
THANKS A LOT BRO CODE, YOU MADE MY SCHOOL PROJECT SIMPLER...
@StacieButler-h1n11 ай бұрын
I love your quiz game video for Java. Do you have one for Python that uses Tkinter?
@vxintruder9 ай бұрын
Yes, I do
@mrpadz27602 жыл бұрын
Thanks for teaching
@godofyoshy26 күн бұрын
I haven't seen anyone point this out in the comment section, but this guy types insanely fast. how??
@zabehullahalizadeh23102 жыл бұрын
Thank you so much Bro Code. Can you make some python projects for beginners . Please
@DrRajibShahriar Жыл бұрын
🥰this guy is awesome for new coders
@rasberry_the10019 күн бұрын
thanks bro code
@PedroRodriguez-fv6sc Жыл бұрын
Hey man, great work. You got a like and a subscriber right away.
@Karen00586 Жыл бұрын
Thank you for teaching coding
@jessicaferreira_fjes2 жыл бұрын
This help me a lot!!! Thank you!!
@MrHaleeyz1Ай бұрын
tq, its very help me.
@nicksonyosepsitumorang455711 ай бұрын
So helpful thanks bro
@appigoud36202 жыл бұрын
bro please do videos on beginners projects in python👍🙏
@oporka4656 Жыл бұрын
best Channal ever
@sfSanuga2 жыл бұрын
Glad to see you brother
@fly2012able2 жыл бұрын
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?
@matheusgafanhoto82322 жыл бұрын
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
@fly2012able2 жыл бұрын
@@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. 🙁🙁
@ellana_de2 жыл бұрын
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?
@aaakhanbrothers69535 күн бұрын
noice
@prabuddhapal2 жыл бұрын
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 .
@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
@cooortst2 жыл бұрын
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!
@tiwariji9985 Жыл бұрын
Awsome Video brother new subscriber added ❤❤ Plus 101 comment 😅
@iohanstefanjourney46132 жыл бұрын
I would love to see a tutorial on web scraping
@KrashankantSharma64598 ай бұрын
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"
@fartlivion9279 Жыл бұрын
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?
@jademcshane07jade62 жыл бұрын
Sir, I've watched all youre python course, what should I learn next?
@BroCodez2 жыл бұрын
Data Structures & Algorithms might be good.
@jademcshane07jade62 жыл бұрын
@@BroCodez Ok ty
@ramakrishna40922 жыл бұрын
@@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
@lxtzone52175 ай бұрын
Trying to make a guilty gear quiz code thank u so much
@Mixmers2 жыл бұрын
thanks for your service
@X-manGamez Жыл бұрын
nice tutorial. good work!
@mohamedriflan82635 ай бұрын
I have learnt many thing from you. Thank @BroCodez
@haidaral-ajmi9878 Жыл бұрын
Thank you for your help ☺️
@mnonom_yt3812 жыл бұрын
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.
@spkmusic3826 Жыл бұрын
Keep helping well done
@TorabekRaufov-p8x4 ай бұрын
bro is the best!
@miniadriel Жыл бұрын
can you please make this in in tkinter ? it will be soo cool thanks :)
@CompSciTest Жыл бұрын
How did you make the words at the bottom bright green?
@gabrielabello3339 Жыл бұрын
im curious how do you make this a game? like the app itself
@jokeguy59462 жыл бұрын
Hey bro how can you make the computer choose random questions?
@BroCodez2 жыл бұрын
random.choice(questions) Although you would need to remove every used question and also keep track of the options and correct answers.
@jokeguy59462 жыл бұрын
@@BroCodez thank bro
@KarlEdwards-i1g3 ай бұрын
how to write a movie quiz, randomizing the questions and showing movie clips followed by answer for that movie
@barbarara3447 Жыл бұрын
Wow this is the first time I actually knew how to make one without looking back and forth! Tysm bro code! My version: questions = ("What is the capital of Ukraine?: ", "On which continent is the United states :? ", "What is the color of the Star on the flag of Vietnam?: ", "Who was the first president of Indonesia?: ", "What is the capital of Russia?: ") options = ( ("A. Kyiv", "B. Lviv", "C. Kharkiv", "D. Odessa"), ("A. Asia", "B. Europe", "C. Africa", "D. North America"), ("A. Red", "B. Yellow", "C. White", "D. Blue"), ("A. Joko Widodo", "B. Soekarno", "C. Mohammad Hatta", "D. Megawati"), ("A. Novosibirsk", "B. Saint Petersburg", "C. Moscow", "D. Kazan") ) answers = ("A", "D", "B", "B", "C") 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_percentage = (score / len(questions)) * 100 print(f"Your score is: {score_percentage}% ")
@dillonpaul1498 Жыл бұрын
you could of shown us how it worked in a display screen.
@nikothenoob Жыл бұрын
be greatful 0:54
@pandit_deepanshu52 Жыл бұрын
Which app or site have u used for this??
@IntoTheArmsOfMorpheus Жыл бұрын
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.
@Jemil_7 Жыл бұрын
Bro i want to know that aswell did you find how to do it ?
@user-anonymous0129 ай бұрын
🤯
@uknownytbr158 Жыл бұрын
Thank you
@dhanushkm2104 Жыл бұрын
How do you set the answers for the questions
@jusitin11253 ай бұрын
hello bro, why isn't the upper() function working?
@daudeiyaagbada Жыл бұрын
i love this
@lautaroalvarez399 Жыл бұрын
thanks
@TheGamingDandy Жыл бұрын
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?
@Jemil_7 Жыл бұрын
Broski did you find any solution to that ?
@Gkotsetos13 Жыл бұрын
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!
@Jemil_7 Жыл бұрын
Bro Did you find how to do it ?
@Amit-m1h Жыл бұрын
Thanks bro
@Bacon_editsz10 ай бұрын
Pls make with gui
@GoldPraiseUnigwe10 ай бұрын
Which compiler can I use on my laptop
@mohammedisarezwani Жыл бұрын
looks a little hard for me !
@Shohjahon1492 жыл бұрын
Will you make videos about node js?
@muneerabass95 Жыл бұрын
bro can i make this type of quiz game using if else condiition ??
@Keyshelle Жыл бұрын
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?
@shetty5121 Жыл бұрын
In which software whe shuld do this in idle python itself right?
@KyleC-x7l Жыл бұрын
thanks!
@Huzii6595 ай бұрын
Am I going insane or is this mans typing speed incredibly fast
@hil65172 жыл бұрын
bro when you wrote the questions your keyboard cried for help how did you do that so fast
@anitahagimson54933 ай бұрын
2084 Kutch Ford
@AntonRediker4 ай бұрын
128 McGlynn Mountain
@promiseguitar39163 ай бұрын
Please but whenever I try to run question_num +=1 It keeps saying tuple index out of range
@owaisfakih Жыл бұрын
Which version of Python is this and how to download it?
@Priceygames Жыл бұрын
I think this is the first step to make a workable Flashcard, use set i guess 🤔
@nathanpickens5377Ай бұрын
Mine is only making B correct because it is the answer to the first question
@jhonfrietzofqueria68935 ай бұрын
Does it still work if i remove the options and make the player answer at their own in the game?
@sacred_xd Жыл бұрын
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 💜💜💜