-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquiz-physics.html
479 lines (464 loc) · 18.9 KB
/
quiz-physics.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="common-sub.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap"
rel="stylesheet"
/>
<title>Physics</title>
</head>
<body>
<div class="top-container">
<div class="video-container">
<video autoplay muted loop>
<source src="physics-video.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
</div>
<h1 class="head" style="padding: 5px">PHYSICS</h1>
<p style="font-size: 28px; margin: 38px" class="intr">
Welcome to our Physics Quiz Page!
</p>
<span style="font-size: 21px; padding: 8px; margin: 20px" class="des">
Are you ready to test your knowledge and delve into the fascinating
world of physics? Whether you're a seasoned physicist or just starting
to explore the wonders of the universe, this quiz is designed to
challenge and entertain you. From classical mechanics to quantum theory,
from electricity and magnetism to relativity, our quiz covers a wide
range of topics in physics. Get ready to think critically, solve
problems, and maybe even learn something new along the way. So, grab a
pencil, clear your mind, and let's see how much you really know about
the fundamental laws that govern our universe. Are you up for the
challenge? Let's find out!
</span>
<h4 style="font-size: 28px; margin: 8px" class="start">Let's Start</h4>
<div class="box">
<div class="questions">
<ol>
<li>
<strong class="qhead">Mechanics:</strong><br />
<p>Which of the following best describes inertia?</p>
<br />
<div class="options">
<br /><input type="radio" name="q1" value="a" />A force that
opposes motion. <br /><input
type="radio"
name="q1"
value="b"
/>The tendency of an object to resist changes in its state of
motion. <br /><input type="radio" name="q1" value="c" />The
force exerted by an object on another object. <br /><input
type="radio"
name="q1"
value="d"
/>The measure of an object's gravitational attraction.
</div>
<br />
</li>
<br />
<li>
<strong class="qhead">Kinematics:</strong><br />
<p>What does displacement represent in physics?</p>
<br />
<div class="options">
<br /><input type="radio" name="q2" value="a" />The total
distance traveled by an object. <br /><input
type="radio"
name="q2"
value="b"
/>The speed of an object in a given direction. <br /><input
type="radio"
name="q2"
value="c"
/>The change in position of an object. <br /><input
type="radio"
name="q2"
value="d"
/>The force applied to an object.
</div>
<br />
</li>
<br />
<li>
<strong class="qhead">Newton's Laws of Motion:</strong><br />
<p>
According to Newton's Third Law of Motion, if object A exerts a
force on object B, then:
</p>
<br />
<div class="options">
<br /><input type="radio" name="q3" value="a" />object B exerts
a force of equal magnitude on object A in the same direction.
<br /><input type="radio" name="q3" value="b" /> object B exerts
a force of equal magnitude on object A in the opposite
direction. <br /><input
type="radio"
name="q3"
value="c"
/>object A does not exert any force on object B. <br /><input
type="radio"
name="q3"
value="d"
/>object B exerts a force of greater magnitude on object A.
</div>
<br />
</li>
<br />
<li>
<strong class="qhead">Work, Energy, and Power:</strong><br />
<p>
What is the unit of energy in the International System of Units
(SI)?
</p>
<br />
<div class="options">
<br /><input type="radio" name="q4" value="a" />Joule (J)
<br /><input type="radio" name="q4" value="b" />Newton (N)
<br /><input type="radio" name="q4" value="c" />Watt (W)
<br /><input type="radio" name="q4" value="d" />Pascal (Pa)
</div>
<br />
</li>
<br />
<li>
<strong class="qhead">Fluid Mechanics:</strong><br />
<p>Which of the following statements about density is true?</p>
<br />
<div class="options">
<br /><input type="radio" name="q5" value="a" />Density
decreases with increasing volume. <br /><input
type="radio"
name="q5"
value="b"
/>Density is a measure of the amount of matter in an object.
<br /><input type="radio" name="q5" value="c" />Density is
independent of the size of an object. <br /><input
type="radio"
name="q5"
value="d"
/>Density is measured in kilograms per cubic meter (kg/m³).
</div>
<br />
</li>
<br />
<li>
<strong class="qhead">Thermodynamics:</strong><br />
<p>
Which of the following processes is an example of isothermal
expansion?
</p>
<br />
<div class="options">
<br /><input type="radio" name="q6" value="a" /> Heating a gas
in a sealed container. <br /><input
type="radio"
name="q6"
value="b"
/>Cooling a gas in a sealed container. <br /><input
type="radio"
name="q6"
value="c"
/>Expanding a gas at constant temperature. <br /><input
type="radio"
name="q6"
value="d"
/>Compressing a gas at constant pressure.
</div>
<br />
</li>
<br />
<li>
<strong class="qhead">Electromagnetism:</strong><br />
<p>
What is the direction of the magnetic field around a straight
current-carrying wire?
</p>
<br />
<div class="options">
<br /><input type="radio" name="q7" value="a" />Radially outward
from the wire. <br /><input
type="radio"
name="q7"
value="b"
/>Radially inward towards the wire. <br /><input
type="radio"
name="q7"
value="c"
/>Circumferentially around the wire. <br /><input
type="radio"
name="q7"
value="d"
/>Tangentially along the wire.
</div>
<br />
</li>
<br />
<li>
<strong class="qhead">Circuit Theory:</strong><br />
<p>
In a simple electric circuit with a battery and a resistor, what
happens to the current if the resistance is increased?
</p>
<br />
<div class="options">
<br /><input type="radio" name="q8" value="a" />The current
decreases. <br /><input type="radio" name="q8" value="b" />The
current increases. <br /><input
type="radio"
name="q8"
value="c"
/>The current remains the same. <br /><input
type="radio"
name="q8"
value="d"
/>The current becomes zero.
</div>
<br />
</li>
<br />
<li>
<strong class="qhead">Waves and Optics:</strong><br />
<p>Which type of wave requires a medium to propagate?</p>
<br />
<div class="options">
<br /><input type="radio" name="q9" value="a" />Transverse wave.
<br /><input type="radio" name="q9" value="b" />Longitudinal
wave. <br /><input
type="radio"
name="q9"
value="c"
/>Electromagnetic wave. <br /><input
type="radio"
name="q9"
value="d"
/>Standing wave.
</div>
<br />
</li>
<br />
<li>
<strong class="qhead">Modern Physics:</strong><br />
<p>
What is the smallest constituent particle of an element that
retains its chemical properties?
</p>
<br />
<div class="options">
<br /><input type="radio" name="q10" value="a" />Atom
<br /><input type="radio" name="q10" value="b" />Electron
<br /><input type="radio" name="q10" value="c" />Neutron
<br /><input type="radio" name="q10" value="d" />Proton
</div>
<br />
</li>
<br />
</ol>
<button class="sbut">Submit</button>
<div class="result">
<h3>Congratulaions For Completing The Quiz</h3>
<br /><br />
<p>Correct Options Are :</p>
<br /><br />
<div class="correct-options">
<ul>
<li>
1 > The tendency of an object to resist changes in its state of
motion.
</li><br><br>
<li>2 > The change in position of an object.</li><br><br>
<li>
3 > object B exerts a force of equal magnitude on object A in
the same direction.
</li><br><br>
<li>4 > Joule (J)</li><br><br>
<li>
5 > Density is measured in kilograms per cubic meter (kg/m³).
</li><br><br>
<li>6 > Expanding a gas at constant temperature.</li><br><br>
<li>7 > Circumferentially around the wire.</li><br><br>
<li>8 > The current decreases.</li><br><br>
<li>9 > Longitudinal wave.</li><br><br>
<li>10 > Atom</li><br><br><br><br>
</ul>
<div class="fres">
</div>
</div>
</div>
</div>
</div>
</div>
<script src="common-sub.js"></script>
<script>
var score = 0;
document.querySelector(".sbut").addEventListener("click", function (event) {
event.preventDefault();
document.querySelector(".sbut").innerHTML="Result Below"
document.querySelector(".sbut").style.height='70px'
document.querySelector(".sbut").style.width='90px'
document.querySelector(".result").style.opacity='1'
var q1 = document.querySelector('input[name="q1"]:checked');
if (q1) {
if (q1.value == "b") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[0].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[0].style.color='red'
}
} else {
alert("You Had Not Selected Any Option For Question 1");
}
var q2 = document.querySelector('input[name="q2"]:checked');
if (q2) {
if (q2.value == "c") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[3].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[3].style.color='red'
}
} else {
alert("You Had Not Selected Any Option For Question 2");
}
var q3 = document.querySelector('input[name="q3"]:checked');
if (q3) {
if (q3.value == "a") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[6].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[6].style.color='red'
}
} else {
alert("You Had Not Selected Any Option For Question 3");
}
var q4 = document.querySelector('input[name="q4"]:checked');
if (q4) {
if (q4.value == "a") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[9].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[9].style.color='red'
}
} else {
alert("You Had Not Selected Any Option For Question 4");
}
var q5 = document.querySelector('input[name="q5"]:checked');
if (q5) {
if (q5.value == "d") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[12].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[12].style.color='red'
}
} else {
alert("You Had Not Selected Any Option For Question 5");
}
var q6 = document.querySelector('input[name="q6"]:checked');
if (q6) {
if (q6.value == "c") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[15].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[15].style.color='red'
}
} else {
alert("You Had Not Selected Any Option For Question 6");
}
var q7 = document.querySelector('input[name="q7"]:checked');
if (q7) {
if (q7.value == "c") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[18].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[18].style.color='red'
}
} else {
alert("You Had Not Selected Any Option For Question 7");
}
var q8 = document.querySelector('input[name="q8"]:checked');
if (q8) {
if (q8.value == "a") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[21].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[21].style.color='red'
}
} else {
alert("You Had Not Selected Any Option For Question 8");
}
var q9 = document.querySelector('input[name="q9"]:checked');
if (q9) {
if (q9.value == "b") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[24].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[24].style.color='red'
}
} else {
alert("You Had Not Selected Any Option For Question 9");
}
var q10 = document.querySelector('input[name="q10"]:checked');
if (q10) {
if (q10.value == "a") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[27].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[27].style.color='red'
}
} else {
alert("You Had Not Selected Any Option For Question 10");
}
if (score<4) {
document.querySelector(".fres").innerHTML=`YOUR SCORE IS ${score} OUT OF 10<br>TRY BETTER NEXT TIME`;
document.querySelector(".fres").addEventListener("mouseover",function(){
document.querySelector(".fres").style.backgroundColor='red'
})
document.querySelector(".fres").addEventListener("mouseout",function(){
document.querySelector(".fres").style.backgroundColor='aquamarine'
})
}
else if (score>3 && score<9){
document.querySelector(".fres").innerHTML=`YOUR SCORE IS ${score} OUT OF 10<br>YOU HAD DONE NICE`;
document.querySelector(".fres").addEventListener("mouseover",function(){
document.querySelector(".fres").style.backgroundColor='cornflowerblue'
})
document.querySelector(".fres").addEventListener("mouseout",function(){
document.querySelector(".fres").style.backgroundColor='aquamarine'
})
}
else{
document.querySelector(".fres").innerHTML=`YOUR SCORE IS ${score} OUT OF 10<br>YOU HAD DONE EXCELLENT`;
document.querySelector(".fres").addEventListener("mouseover",function(){
document.querySelector(".fres").style.backgroundColor='greenyellow'
})
document.querySelector(".fres").addEventListener("mouseout",function(){
document.querySelector(".fres").style.backgroundColor='aquamarine'
})
}
});
</script>
</body>
</html>