-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
505 lines (413 loc) · 18.6 KB
/
index.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
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TriCAL</title>
<link rel="stylesheet" href="style.css">
<script src="https://kit.fontawesome.com/d733855d1a.js" crossorigin="anonymous"></script>
<style type = "text/javascript"></style>
</head>
<body>
<div class="head">
<h1 style="color : white;">TriCAL</h1>
<ul class="nav-bar">
<li><a href="https://gaganpreetkaurkalsi.netlify.app/" class="link">Portfolio</a></li>
<li><a href="\" class="link">Who am I?</a></li>
</ul>
</div>
<!-- <div class="heading">
<h1>TRIPedia === Encyclopedia for Triangles</h1>
</div> -->
<div class="container-div">
<div class="square cursor" onclick = "show('check-triangle')">Is it a Triangle?</div>
<div class="square cursor" onclick = "show('calculate-hyp')">Check Hypotenuse</div>
<div class="square cursor" onclick = "show('calculate-area')">Calculate Area</div>
<div class="square cursor" onclick = "show('quiz')">Quiz</div>
</div>
<div class="check-triangle show">
<h2>Enter the angles in the below input boxes to check if they belong to a triangle</h2>
<div class="angles-div">
<input type="number" name="" class="angle clear" id = "angle1">
<input type="number" name="" class="angle clear" id = "angle2">
<input type="number" name="" class="angle clear" id = "angle3">
</div>
<button class="cursor" onclick = "checkAngles()">Submit</button>
<div class="result" id="result"></div>
</div>
<div class="calculate-hyp show" id = "calculate-hyp">
<h2>Enter the lengths of base and height of a right angled triangle in the below input boxes to calculate the length of hypotenuse</h2>
<small>Note : Please enter the lengths in same unit.</small>
<div class="sides-div">
<label for="a">a = </label>
<input type="number" name="a" class="angle clear" id = "sidea">
<label for="b">b = </label>
<input type="number" name="b" class="angle clear" id = "sideb">
</div>
<button class="cursor" onclick = "calculateHyp()">Calculate</button>
<div class="result" id="result"></div>
</div>
<div class="calculate-area show" id = "calculate-area">
<h1>Area Calculator</h1>
<p>Choose the options below based on the information you have to calculate the area of the triangle</p>
<div class="options-div" id="options-div">
<div class="option">
<button class="cursor" id="base-height" onclick="selectbtn('base-height')"></button>
<label for="base-height">Given base and height</label>
</div>
<div class="option">
<button class="cursor" id="sides" onclick="selectbtn('sides')"></button>
<label for="sides">Given length of sides</label>
</div>
<div class="option">
<button class="cursor" id="equi-triangle" onclick="selectbtn('equi-triangle')"></button>
<label for="equi-triangle">Given the side of an equilateral triangle</label>
</div>
<div class="option">
<button class="cursor" id="side-angle" onclick="selectbtn('side-angle')"></button>
<label for="side-angle">Given 2 adjacent sides and included triangle</label>
</div>
</div>
<div class="base-height area">
<div class="inline center">
<label for="base">base = </label>
<input type="number" name="base" class="side input-box clear" id = "base">
</div>
<div class="inline center">
<label for="height">height = </label>
<input type="number" name="height" class="side input-box clear" id = "height">
</div>
<button class="cursor next-line padd" onclick = "baseHeight('base-height')">Calculate</button>
</div>
<div class="sides area">
<div class="inline center">
<label for="a">a = </label>
<input type="number" name="a" class="side input-box clear" id = "a">
</div>
<div class="inline center">
<label for="b">b = </label>
<input type="number" name="b" class="side input-box clear" id = "b">
</div>
<div class="inline center">
<label for="c">c = </label>
<input type="number" name="c" class="side input-box clear" id = "c">
</div>
<button class="cursor next-line padd" onclick = "sides('sides')">Calculate</button>
</div>
<div class="equi-triangle area">
<label for="abc">a = b = c = </label>
<input type="number" name="abc" class="side input-box clear" id = "abc">
<button class="cursor next-line padd" onclick = "equiTriangle('equi-triangle')">Calculate</button>
</div>
<div class="side-angle area">
<div class="inline center">
<label for="side1">side1 = </label>
<input type="number" name="side1" class="side input-box clear" id = "side1">
</div>
<div class="inline center">
<label for="side2">side2 = </label>
<input type="number" name="side2" class="side input-box clear" id = "side2">
</div>
<div class="inline center">
<label for="angle">∠ = </label>
<input type="number" name="angle" class="angle input-box clear" id = "angle">
</div>
<button class="cursor next-line padd" onclick = "sideAngle('side-angle')">Calculate</button>
</div>
<div class="result" id="result"></div>
</div>
<div class="quiz show" id = "quiz">
<h1>QUIZ</h1>
<hr class="line">
<section class="question">
<p>This type of triangle has one 90° angle.</p>
<div class="inline">
<input type="radio" name="1" id="">
<label for="1">Acute</label>
</div>
<div class="inline">
<input type="radio" name="1" id="" class="ans">
<label for="1">Right</label>
</div>
<div class="inline">
<input type="radio" name="1" id="">
<label for="1">Obtuse</label>
</div>
</section>
<section class="question">
<p>If you add up the degrees of each angle on a triangle, what is the sum?</p>
<div class="inline">
<input type="radio" name="2" id="">
<label for="2">90°</label>
</div>
<div class="inline">
<input type="radio" name="2" id="" class="ans">
<label for="2">180°</label>
</div>
<div class="inline">
<input type="radio" name="2" id="">
<label for="2">360°</label>
</div>
</section>
<section class="question">
<p>What triangle is it called when all three sides are the same?</p>
<div class="inline">
<input type="radio" name="3" id="">
<label for="3">Scalene</label>
</div>
<div class="inline">
<input type="radio" name="3" id="">
<label for="3">Isosceles</label>
</div>
<div class="inline">
<input type="radio" name="3" id="" class="ans">
<label for="3">Equilateral</label>
</div>
</section>
<section class="question">
<p>What triangle is it called when two sides are the same and only one is different?</p>
<div class="inline">
<input type="radio" name="4" id="">
<label for="4">Scalene</label>
</div>
<div class="inline">
<input type="radio" name="4" id="" class="ans">
<label for="4">Isosceles</label>
</div>
<div class="inline">
<input type="radio" name="4" id="">
<label for="4">Equilateral</label>
</div>
</section>
<section class="question">
<p>A ________ triangle is one where all 3 angles measure less than 90 degrees.</p>
<div class="inline">
<input type="radio" name="5" id="" class="ans">
<label for="5">Acute</label>
</div>
<div class="inline">
<input type="radio" name="5" id="">
<label for="5">Right</label>
</div>
<div class="inline">
<input type="radio" name="5" id="">
<label for="5">Obtuse</label>
</div>
</section>
<section class="question">
<p>A triangle where all sides are congruent is called</p>
<div class="inline">
<input type="radio" name="6" id="">
<label for="6">Scalene</label>
</div>
<div class="inline">
<input type="radio" name="6" id="">
<label for="6">Isosceles</label>
</div>
<div class="inline">
<input type="radio" name="6" id="" class="ans">
<label for="6" >Equilateral</label>
</div>
</section>
<section class="question">
<p>A triangle with one angle greater than 90°</p>
<div class="inline">
<input type="radio" name="7" id="">
<label for="7">equilateral triangle</label>
</div>
<div class="inline">
<input type="radio" name="7" id="" class="ans">
<label for="7">obtuse triangle</label>
</div>
<div class="inline">
<input type="radio" name="7" id="">
<label for="7" class="">acute triangle</label>
</div>
<div class="inline">
<input type="radio" name="7" id="">
<label for="7" class="">isosceles triangle</label>
</div>
</section>
<section class="question">
<p>In right triangle, the side opposite to right angle is called</p>
<div class="inline">
<input type="radio" name="8" id="">
<label for="8">altitude</label>
</div>
<div class="inline">
<input type="radio" name="8" id="" class="ans">
<label for="8">hypotenuse</label>
</div>
<div class="inline">
<input type="radio" name="8" id="">
<label for="8" class="">angle bisector</label>
</div>
</section>
<section class="question">
<p>The perimeter of an equilateral triangle is 15cm. What is the length of one side?</p>
<div class="inline">
<input type="radio" name="9" id="">
<label for="9">3</label>
</div>
<div class="inline">
<input type="radio" name="9" id="">
<label for="9">45</label>
</div>
<div class="inline">
<input type="radio" name="9" id="">
<label for="9">15</label>
</div>
<div class="inline">
<input type="radio" name="9" id="" class="ans">
<label for="9">5</label>
</div>
</section>
<section class="question">
<p>What is the name of the segment that joins the midpoints of the sides of a triangle?</p>
<div class="inline">
<input type="radio" name="10" id="">
<label for="10">Median</label>
</div>
<div class="inline">
<input type="radio" name="10" id="" class="ans">
<label for="10">Midsegment</label>
</div>
<div class="inline">
<input type="radio" name="10" id="">
<label for="10">Vertex</label>
</div>
<div class="inline">
<input type="radio" name="10" id="">
<label for="10">Centroid</label>
</div>
</section>
<section class="question">
<p>Which center is equidistant from the vertices of a triangle.</p>
<div class="inline">
<input type="radio" name="11" id="">
<label for="11">Incenter</label>
</div>
<div class="inline">
<input type="radio" name="11" id="">
<label for="11">Centroid</label>
</div>
<div class="inline">
<input type="radio" name="11" id="" class="ans">
<label for="11">Circumcenter</label>
</div>
<div class="inline">
<input type="radio" name="11" id="">
<label for="11">Orthocenter</label>
</div>
</section>
<section class="question">
<p>Which triangle center is the balance point of the triangle.</p>
<div class="inline">
<input type="radio" name="12" id="">
<label for="12">Incenter</label>
</div>
<div class="inline">
<input type="radio" name="12" id="" class="ans">
<label for="12">Centroid</label>
</div>
<div class="inline">
<input type="radio" name="12" id="">
<label for="12">Circumcenter</label>
</div>
<div class="inline">
<input type="radio" name="12" id="">
<label for="12">Orthocenter</label>
</div>
</section>
<section class="question">
<p>What is the name of the segment that joins a vertex to the midpoint of the opposite side in a triangle?</p>
<div class="inline">
<input type="radio" name="13" id="">
<label for="13">Midsegment</label>
</div>
<div class="inline">
<input type="radio" name="13" id="" class="ans" >
<label for="13">Median</label>
</div>
<div class="inline">
<input type="radio" name="13" id="">
<label for="13">Vertex</label>
</div>
<div class="inline">
<input type="radio" name="13" id="">
<label for="13">Centroid</label>
</div>
</section>
<section class="question">
<p>What center is created by constructing the angle bisectors of a triangle?</p>
<div class="inline">
<input type="radio" name="14" id="">
<label for="14">Circumcenter</label>
</div>
<div class="inline">
<input type="radio" name="14" id="">
<label for="14">Centroid</label>
</div>
<div class="inline">
<input type="radio" name="14" id="">
<label for="14">Orthocenter</label>
</div>
<div class="inline">
<input type="radio" name="14" id="" class="ans">
<label for="14">Incenter</label>
</div>
</section>
<section class="question">
<p>What is the point of concurrency of the altitudes?</p>
<div class="inline">
<input type="radio" name="15" id="">
<label for="15">Circumcenter</label>
</div>
<div class="inline">
<input type="radio" name="15" id="">
<label for="15">Centroid</label>
</div>
<div class="inline">
<input type="radio" name="15" id="" class="ans">
<label for="15">Orthocenter</label>
</div>
<div class="inline">
<input type="radio" name="15" id="">
<label for="15">Incenter</label>
</div>
</section>
<section class="question">
<p>What is the name of a ray that divides an angle into two equal angles?</p>
<div class="inline">
<input type="radio" name="16" id="">
<label for="16">Perpendicular Bisector</label>
</div>
<div class="inline">
<input type="radio" name="16" id="" class="ans">
<label for="16">Angle Bisector</label>
</div>
<div class="inline">
<input type="radio" name="16" id="">
<label for="16">Midpoint</label>
</div>
<div class="inline">
<input type="radio" name="16" id="">
<label for="16">Median</label>
</div>
</section>
<button class="cursor quiz-submit" onclick = "calculatePoints()">Submit</button>
<small>NOTE : 1 mark for every correct answer. No negative marking.</small>
<div class="result" id = "result"></div>
</div>
<footer class = "footer">
<div class = "footer-header">social media presence</div>
<ul class="social-links list">
<li class = "list-item-inline"><a href="https://github.com/GaganpreetKaurKalsi" class = "link-footer"><i class="fab fa-github"></i></a></li>
<li class = "list-item-inline"><a href="https://www.linkedin.com/in/gaganpreet-kaur-kalsi-2a6650191/" class = "link-footer"><i class="fab fa-linkedin-in"></i></a></li>
<li class = "list-item-inline"><a href="https://www.instagram.com/gagan_singhkalsi11/" class = "link-footer"><i class="fab fa-instagram"></i></a></li>
</ul>
</footer>
<script src="script.js"></script>
</body>
</html>