Skip to content

Commit 90f70ab

Browse files
updated
1 parent 0f4d80b commit 90f70ab

2 files changed

Lines changed: 58 additions & 24 deletions

File tree

24-quiz-game/main.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
questions = ("how many elements are in periodic table?",
2+
"which animal lays the largest eggs?",
3+
"what is the most abundant gas in earth's atmosphere?",
4+
"how many bones are in human body?",
5+
"which planet in the solar system is the hottest"
6+
)
7+
8+
options = (
9+
("A. 118", "B. 108", "C. 128", "D. 98"),
10+
("A. ostrich", "B. whale", "C. elephant", "D. giraffe"),
11+
("A. oxygen", "B. nitrogen", "C. carbon dioxide", "D. argon"),
12+
("A. 206", "B. 208", "C. 210", "D. 212"),
13+
("A. mercury", "B. venus", "C. earth", "D. mars")
14+
)
15+
16+
answers = ("A", "A", "B", "A", "B")
17+
guesses = []
18+
score = 0
19+
question_num = 0
20+
21+
for question, option in zip(questions, options):
22+
print("--------------------")
23+
print(question)
24+
for opt in option:
25+
print(opt)
26+
guess = input("Enter your guess: ")
27+
guesses.append(guess)
28+
if guess.upper() == answers[question_num]:
29+
score += 1
30+
question_num += 1
31+
32+
print(f"Your score is {score}/{len(questions)}")
33+

README.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
# python-bro-code
2-
[Bro Code Python YouTube Class](https://youtu.be/ix9cRaBkVe0?feature=shared)
32

3+
[Bro Code Python YouTube Class](https://youtu.be/ix9cRaBkVe0?feature=shared)
44

5-
Learn Python in 1 HOUR ⏱ : Learn Python in 1 hour! 🐍 (2024)
6-
My original Python 12 Hour course 🐍 : Python Full Course for free 🐍
7-
Full Python playlist 📃: Start coding with PYTHON in 5 minutes! 🐍
5+
Learn Python in 1 HOUR ⏱ : [Learn Python in 1 hour! 🐍 (2024)](https://youtu.be/ix9cRaBkVe0?feature=shared)
6+
My original Python 12 Hour course 🐍 : [Python Full Course for free 🐍](https://youtu.be/ix9cRaBkVe0?feature=shared)
7+
Full Python playlist 📃: [Start coding with PYTHON in 5 minutes! 🐍](https://youtu.be/ix9cRaBkVe0?feature=shared)
88

99
[⭐ = project]
10-
#1 (00:00:00) python tutorial for beginners 🐍
11-
#2 (00:05:49) variables ❎
12-
#3 (00:16:05) type casting 💱
13-
#4 (00:21:15) user input ⌨️
14-
#5 (00:32:42) ⭐ madlibs game 📖
15-
#6 (00:37:55) arithmetic & math 📐
16-
#7 (00:51:46) if statements 🤔
17-
#8 (01:00:06) ⭐ calculator program 🧮
18-
#9 (01:05:59) ⭐ weight conversion program 🏋️
19-
#10 (01:09:59) ⭐ temperature conversion program 🌡️
20-
#11 (01:13:58) logical operators 🌦️
21-
#12 (01:21:28) conditional expressions ❓
22-
#13 (01:27:03) string methods 〰️
23-
#14 (01:39:08) string indexing ✂️
24-
#15 (01:46:35) format specifiers 💬
25-
#16 (01:51:55) while loops ♾️
26-
#17 (01:58:53) ⭐ compound interest calculator 💵
27-
#18 (02:06:28) for loops 🔁
28-
#19 (02:11:33) ⭐ countdown timer program ⌛
29-
#20 (02:17:28) nested loops ➿
10+
11+
1. (00:00:00) python tutorial for beginners 🐍
12+
2. (00:05:49) variables ❎
13+
3. (00:16:05) type casting 💱
14+
4. (00:21:15) user input ⌨️
15+
5. (00:32:42) ⭐ madlibs game 📖
16+
6. (00:37:55) arithmetic & math 📐
17+
7. (00:51:46) if statements 🤔
18+
8. (01:00:06) ⭐ calculator program 🧮
19+
9. (01:05:59) ⭐ weight conversion program 🏋️
20+
10. (01:09:59) ⭐ temperature conversion program 🌡️
21+
11. (01:13:58) logical operators 🌦️
22+
12. (01:21:28) conditional expressions ❓
23+
13. (01:27:03) string methods 〰️
24+
14. (01:39:08) string indexing ✂️
25+
15. (01:46:35) format specifiers 💬
26+
16. (01:51:55) while loops ♾️
27+
17. (01:58:53) ⭐ compound interest calculator 💵
28+
18. (02:06:28) for loops 🔁
29+
19. (02:11:33) ⭐ countdown timer program ⌛
30+
20. (02:17:28) nested loops ➿
3031
#21 (02:23:03) lists, sets, and tuples 🍎
3132
#22 (02:38:08) ⭐ shopping cart program 🛒
3233
#23 (02:45:21) 2D collections ⬜

0 commit comments

Comments
 (0)