Skip to content

Commit f8d6b06

Browse files
authored
Create 6th grade math.py
1 parent 7aad97e commit f8d6b06

1 file changed

Lines changed: 153 additions & 0 deletions

File tree

‎quizes/6th grade math.py‎

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
import random
2+
3+
# List of questions and answers
4+
questions = [
5+
{
6+
"question": "A submarine is 250 feet below sea level. What integer represents the submarine's depth?",
7+
"answer": "-250"
8+
},
9+
{
10+
"question": "What is the greatest common factor (GCF) of 18 and 24?",
11+
"answer": "6"
12+
},
13+
{
14+
"question": "Calculate: -15+7",
15+
"answer": "-8"
16+
},
17+
{
18+
"question": "If you have a fraction ⅝, what is its equivalent decimal?please answer with zero before point if answer is decimal with no whole number.",
19+
"answer": "0.625"
20+
},
21+
{
22+
"question": "What is the absolute value of -3.2?",
23+
"answer": "3.2"
24+
},
25+
{
26+
"question": "Simplify the ratio 12:18",
27+
"answer": "2:3"
28+
},
29+
{
30+
"question": "In a class, there are 15 boys and 12 girls. What is the ratio of boys to girls?",
31+
"answer": "15:12"
32+
},
33+
{
34+
"question": "A recipe calls for 2 cups of flour for every 3 cups of milk. If you use 9 cups of milk, how many cups of flour do you need",
35+
"answer": "6"
36+
},
37+
{
38+
"question": "What is 40 percent of 50?",
39+
"answer": "20"
40+
},
41+
{
42+
"question": "A jacket is 25 percent off. If the original price was $80, what is the sale price",
43+
"answer": "$60"
44+
45+
},
46+
47+
{
48+
"question": "Solve for x: 7x = 28",
49+
"answer": "4"
50+
51+
},
52+
{
53+
"question": "solve for k: k-5 = 12",
54+
"answer": "17"
55+
},
56+
{
57+
"question": "What is the value of the expression 5+3×4",
58+
"answer": "17"
59+
},
60+
{
61+
"question": "A rectangular prism has a length of 5 inches, a width of 3 inches, and a height of 4 inches. What is its volume? answer with no space between the number and in",
62+
"answer": "60in"
63+
},
64+
{
65+
"question": "A square has a side length of 5 cm. What is its perimeter?",
66+
"answer": "20cm"
67+
},
68+
{
69+
"question": "Find the area of a rectangle with a length of 10 feet and a width of 6 feet.",
70+
"answer": "60ft"
71+
},
72+
{
73+
"question": "A bag contains 5 red marbles, 3 blue marbles, and 2 green marbles. What is the probability of drawing a red marble? (answer in decimal form)",
74+
"answer": "0.5"
75+
},
76+
{
77+
"question": "What is the mean (average) of the following data set: 10, 15, 20, 25?",
78+
"answer": "17.5"
79+
},
80+
{
81+
"question": "A school has 500 students. If 40 percent of the students are girls, how many girls are in the school?",
82+
"answer": "200"
83+
},
84+
{
85+
"question": "What is the range of the following data set: 10, 15, 20, 25?",
86+
"answer": "15"
87+
},
88+
{
89+
"question": "What is the mode of the following data set: 10, 15, 20, 25, 20?",
90+
"answer": "20"
91+
},
92+
{
93+
"question": "Add: 3/4+1/8",
94+
"answer": "7/8"
95+
},
96+
{
97+
"question": "Subtract: 5 - 2 1/3",
98+
"answer": "2 2/3"
99+
},
100+
{
101+
"question": "Multiply: 2/5×3/4 (please simplify and make proper)",
102+
"answer": "3/10"
103+
},
104+
{
105+
"question": "Divide: 4/5÷2/3 (please simplify and make proper)",
106+
"answer": "1 2/10"
107+
},
108+
{
109+
"question": "convert the fraction 3/5 into a persentage",
110+
"answer": "60%"
111+
},
112+
{
113+
"question": "A car travels 180 miles in 3 hours. What is its average speed in miles per hour?",
114+
"answer": "60mph"
115+
},
116+
{
117+
"question": "A recipe requires 3 cups of sugar for every 4 cups of flour. If you use 12 cups of flour, how much sugar do you need?",
118+
"answer": "9cups"
119+
},
120+
{
121+
"question": "On a map, 1 inch represents 50 miles. If two cities are 3.5 inches apart on the map, what is the actual distance between them?",
122+
"answer": "175mi"
123+
},
124+
{
125+
"question": "A bag contains 4 red marbles, 6 blue marbles, and 5 green marbles. What is the probability of randomly drawing a blue marble?",
126+
"answer": "0.4"
127+
},
128+
{
129+
"question": "Find the median of this data set: 12, 8, 15, 10, 11, 15",
130+
"answer": "11.5"
131+
},
132+
{
133+
"question": "A survey of 100 students found that 60 percent like pizza. How many students like pizza?",
134+
"answer": "60"
135+
}
136+
137+
138+
139+
]
140+
141+
142+
# Shuffle the questions
143+
random.shuffle(questions)
144+
145+
# Loop through each question
146+
for question in questions:
147+
while True:
148+
user_answer = input(question["question"] + "\n").strip().lower()
149+
if user_answer == question["answer"]:
150+
print("Correct!")
151+
break
152+
else:
153+
print("Incorrect! Try again.")

0 commit comments

Comments
 (0)