-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpre-algebra.html
More file actions
4614 lines (4079 loc) · 236 KB
/
pre-algebra.html
File metadata and controls
4614 lines (4079 loc) · 236 KB
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
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pre-Algebra - Math Learning - Better Dev</title>
<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=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="topbar">
<button class="sidebar-toggle" aria-label="Open navigation" aria-expanded="false">
<span class="hamburger-icon"></span>
</button>
<a href="index.html" class="logo">Better Dev</a>
</header>
<div class="sidebar-backdrop" aria-hidden="true"></div>
<aside class="sidebar" aria-label="Site navigation">
<div class="sidebar-header">
<span class="sidebar-title">Navigation</span>
<button class="sidebar-close" aria-label="Close navigation">×</button>
</div>
<div class="sidebar-search">
<input type="text" class="sidebar-search-input" placeholder="Search topics..." aria-label="Search topics">
<div class="sidebar-search-results"></div>
</div>
<nav class="sidebar-nav">
<div class="sidebar-group">
<a href="index.html">Home</a>
</div>
<div class="sidebar-group">
<div class="sidebar-group-label">Mathematics</div>
<a href="pre-algebra.html">Pre-Algebra</a>
<a href="algebra.html">Algebra</a>
<a href="sequences-series.html">Sequences & Series</a>
<a href="geometry.html">Geometry</a>
<a href="calculus.html">Calculus</a>
<a href="discrete-math.html">Discrete Math</a>
<a href="linear-algebra.html">Linear Algebra</a>
<a href="probability.html">Probability & Statistics</a>
<a href="binary-systems.html">Binary & Number Systems</a>
<a href="number-theory.html">Number Theory for CP</a>
<a href="computational-geometry.html">Computational Geometry</a>
<a href="game-theory.html">Game Theory</a>
</div>
<div class="sidebar-group">
<div class="sidebar-group-label">Data Structures & Algorithms</div>
<a href="dsa-foundations.html">DSA Foundations</a>
<a href="arrays.html">Arrays & Strings</a>
<a href="stacks-queues.html">Stacks & Queues</a>
<a href="hashmaps.html">Hash Maps & Sets</a>
<a href="linked-lists.html">Linked Lists</a>
<a href="trees.html">Trees & BST</a>
<a href="graphs.html">Graphs</a>
<a href="sorting.html">Sorting & Searching</a>
<a href="patterns.html">LeetCode Patterns</a>
<a href="dp.html">Dynamic Programming</a>
<a href="advanced.html">Advanced Topics</a>
<a href="string-algorithms.html">String Algorithms</a>
<a href="advanced-graphs.html">Advanced Graphs</a>
<a href="advanced-dp.html">Advanced DP</a>
<a href="advanced-ds.html">Advanced Data Structures</a>
<a href="leetcode-650.html">The 650 Problems</a>
<a href="competitive-programming.html">CP Roadmap</a>
</div>
<div class="sidebar-group">
<div class="sidebar-group-label">Languages & Systems</div>
<a href="cpp.html">C++</a>
<a href="golang.html">Go</a>
<a href="javascript.html">JavaScript Deep Dive</a>
<a href="typescript.html">TypeScript</a>
<a href="nodejs.html">Node.js Internals</a>
<a href="os.html">Operating Systems</a>
<a href="linux.html">Linux</a>
<a href="git.html">Git</a>
<a href="backend.html">Backend</a>
<a href="system-design.html">System Design</a>
<a href="networking.html">Networking</a>
<a href="cloud.html">Cloud & Infrastructure</a>
<a href="docker.html">Docker & Compose</a>
<a href="kubernetes.html">Kubernetes</a>
<a href="message-queues.html">Queues & Pub/Sub</a>
<a href="selfhosting.html">VPS & Self-Hosting</a>
<a href="databases.html">PostgreSQL & MySQL</a>
<a href="stripe.html">Stripe & Payments</a>
<a href="distributed-systems.html">Distributed Systems</a>
<a href="backend-engineering.html">Backend Engineering</a>
</div>
<div class="sidebar-group">
<div class="sidebar-group-label">JS/TS Ecosystem</div>
<a href="js-tooling.html">Tooling & Bundlers</a>
<a href="js-testing.html">Testing</a>
<a href="ts-projects.html">Building with TS</a>
</div>
<div class="sidebar-group">
<div class="sidebar-group-label">More</div>
<a href="seans-brain.html">Sean's Brain</a>
</div>
</nav>
</aside>
<div class="container">
<!-- ===== PAGE HEADER ===== -->
<div class="page-header">
<div class="breadcrumb"><a href="index.html">Home</a> / Pre-Algebra</div>
<h1>Pre-Algebra</h1>
<p>The foundation of all mathematics. Master these concepts and every topic that follows will make sense. No prior knowledge required -- we start from scratch.</p>
<div class="tip-box" style="margin-top: 1rem;">
<div class="label">Study Approach for Beginners</div>
<p>If you're new to math or feeling rusty, <strong>take your time</strong> with this section. Work through every example step by step. Practice with pencil and paper, not just reading. Math is like learning to drive -- you need hands-on practice, not just theory. Aim for understanding "why" something works, not just memorizing steps.</p>
</div>
<div class="warning-box" style="margin-top: 1rem;">
<div class="label">How to ACTUALLY Get Strong at Math (Read This First)</div>
<p>Let's be real: <strong>reading this site alone will not make you good at math.</strong> Reading gives you familiarity. Practice gives you skill. These are completely different things. Here's how to actually build strength:</p>
<ol>
<li><strong>Don't just read the examples -- cover the answer and try to solve them yourself first.</strong> If you just read "Step 1... Step 2... Answer: 15" and nod along, you've learned nothing. You've tricked your brain into thinking "I get it" when really you watched someone else get it.</li>
<li><strong>Work problems with pencil and paper.</strong> Not in your head. Not by staring at the screen. Write things down. Draw diagrams. The physical act of writing forces your brain to process the math differently than reading does.</li>
<li><strong>Struggle is the point.</strong> If every problem feels easy, you're not learning -- you're reviewing. Real learning happens when you're stuck, when you have to think for 5 minutes, when you get it wrong and have to figure out why. That discomfort is your brain building new pathways.</li>
<li><strong>Spaced repetition beats cramming.</strong> You'll forget 80% of what you read within a week if you don't come back to it. Study a section, move on, then come back 2 days later and try the problems again without looking at your notes. The struggle to recall is what creates lasting memory.</li>
<li><strong>Solve problems you haven't seen before.</strong> The worked examples on this page show you HOW. The practice problems test if you actually learned it. But real strength comes from tackling unfamiliar problems where you don't know the approach yet. Use the external practice sites linked at the bottom of each section.</li>
<li><strong>Teach it to someone (or to yourself).</strong> After studying a section, close the page and explain the concept out loud as if you're teaching a friend. If you can't explain it clearly, you don't understand it yet.</li>
</ol>
<p><strong>The bottom line:</strong> This site is a strong reference and learning guide. If you follow it with dedication AND work the practice problems with pencil and paper AND use external sites for more problems, yes, you will build a solid foundation. If you just read through it, you'll feel like you understand but struggle to apply it under pressure. The difference is always practice.</p>
</div>
<div class="tip-box" style="margin-top: 1rem;">
<div class="label">Why Pre-Algebra Matters for Programming</div>
<p>"This is just basic math, why do I need it for CS?" Because <strong>every line of code you write is math in disguise</strong>. Here's how each topic on this page maps directly to programming:</p>
<ul>
<li><strong>Number types</strong> → Every programming language has data types (<code>int</code>, <code>float</code>, <code>double</code>, <code>unsigned</code>). Understanding which numbers fit where prevents bugs like integer overflow.</li>
<li><strong>Order of operations</strong> → Your compiler evaluates <code>3 + 4 * 2</code> using BODMAS. Get it wrong and your program produces the wrong answer silently -- the worst kind of bug.</li>
<li><strong>Fractions & decimals</strong> → Floating-point arithmetic. Why does <code>0.1 + 0.2 == 0.30000000000000004</code> in JavaScript? You need to understand decimals to understand why.</li>
<li><strong>Percentages</strong> → Progress bars, CPU/memory usage, analytics dashboards, discount calculations in e-commerce, machine learning accuracy metrics.</li>
<li><strong>Ratios & proportions</strong> → Aspect ratios (16:9), responsive design scaling, rate limiting (100 requests per minute), compression ratios.</li>
<li><strong>Exponents</strong> → Big-O notation (<code>O(n^2)</code>, <code>O(2^n)</code>), powers of 2 (memory sizes: 1KB = 2^10 bytes), exponential growth in algorithms.</li>
<li><strong>Negative numbers</strong> → Array indexing in Python (<code>arr[-1]</code>), coordinate systems in games, temperature sensors, financial calculations, two's complement binary.</li>
<li><strong>Modular arithmetic</strong> → The <code>%</code> operator: hash tables, circular buffers, FizzBuzz, cryptography, pagination, checking even/odd -- you'll use mod more than any other math in code.</li>
<li><strong>Floor & ceiling</strong> → Binary search midpoint, pagination (<code>ceil(items/perPage)</code>), memory alignment, dividing work across threads.</li>
</ul>
<p>You are not just "learning basic math." You are building the mental model that every programming concept sits on top of.</p>
</div>
<div class="warning-box" style="margin-top: 1rem;">
<div class="label">The Path to Getting Strong -- What Actually Works</div>
<p><strong>"Truly smart" is not a destination you arrive at.</strong> It's a daily practice. The people you look at and think "they're brilliant" -- they still struggle with new material, still forget things, still get stuck. The difference is they've been doing the reps longer and they don't quit when it gets hard.</p>
<h4 style="margin-top: 1rem;">Active Recall -- The #1 Study Technique</h4>
<ol>
<li><strong>Don't re-read sections.</strong> Instead, close the page and write down everything you remember about a topic from memory. The gaps you find ARE what you need to study.</li>
<li><strong>Space it out.</strong> Study fractions today. Come back in 2 days and try the problems again without notes. Then again in a week. Then in 2 weeks. Each time it gets easier -- that's the memory solidifying.</li>
<li><strong>Test yourself, don't quiz yourself.</strong> There's a difference. Quizzing is multiple choice. Testing is a blank page and the question "solve 3/4 / 2/5" with nothing to help you.</li>
</ol>
<h4 style="margin-top: 1rem;">About Motivation and Distraction</h4>
<p>Motivation is what you feel right now. <strong>It will fade.</strong> Every single person who commits to learning something hard hits a wall where it stops being exciting and starts being boring, repetitive work. That's where most people quit. The ones who get strong are the ones who show up on the days they don't feel like it.</p>
<h4 style="margin-top: 1rem;">Practical Structure That Works</h4>
<ul>
<li>Pick a fixed time every day -- even 30-45 minutes -- and make it <strong>non-negotiable</strong></li>
<li>Study one section at a time. Don't rush through everything</li>
<li>Do problems until you can solve them <strong>without looking at examples</strong></li>
<li>Move to the next section only when the current one feels automatic</li>
<li>Every week, go back and <strong>redo problems from previous sections cold</strong></li>
</ul>
<h4 style="margin-top: 1rem;">What Progress Actually Looks Like</h4>
<ul>
<li>It's <strong>not linear</strong>. You'll feel stupid regularly. That's normal.</li>
<li>You'll understand something perfectly, then forget it a week later. That's normal.</li>
<li>Some topics will click instantly. Others will take 5x longer. That's normal.</li>
<li>The early sections (pre-algebra, basic algebra) build the foundation for everything else. <strong>If you rush them, everything later breaks down.</strong></li>
</ul>
<h4 style="margin-top: 1rem;">The Uncomfortable Truth</h4>
<p>There are no shortcuts. The people who are strong in CS and math put in the work consistently over a long period. Not in bursts of motivation followed by weeks of nothing -- <strong>consistently</strong>. Small amounts, daily, for a long time, beats intense cramming every time. The content is here. The practice problems are here. The external resources are linked. The only variable left is whether you actually sit down and do it, day after day, especially on the days you don't want to.</p>
</div>
</div>
<!-- ===== TABLE OF CONTENTS ===== -->
<div class="toc">
<h4>Table of Contents</h4>
<a href="#number-types">1. Number Types</a>
<a href="#times-tables">2. Times Tables (Multiplication 1-12)</a>
<a href="#order-of-operations">3. Order of Operations (BODMAS / PEMDAS)</a>
<a href="#fractions">4. Fractions</a>
<a href="#decimals">5. Decimals</a>
<a href="#percentages">6. Percentages</a>
<a href="#ratios">7. Ratios and Proportions</a>
<a href="#exponents">8. Exponents and Square Roots</a>
<a href="#negatives">9. Negative Numbers</a>
<a href="#modular">10. Modular Arithmetic (The % Operator)</a>
<a href="#floor-ceil">11. Floor, Ceiling & Integer Division</a>
<a href="#quiz">12. Practice Quiz</a>
</div>
<!-- ============================================================ -->
<!-- SECTION 1: NUMBER TYPES -->
<!-- ============================================================ -->
<section id="number-types">
<h2>1. Number Types</h2>
<p>Before we do anything with numbers, let's understand what kinds of numbers exist. Think of it as a family tree -- each type builds on the last one.</p>
<h3>Natural Numbers (Counting Numbers)</h3>
<p>These are the numbers you first learned as a kid: <strong>1, 2, 3, 4, 5, ...</strong> and so on forever. They are called "natural" because they feel, well, natural. You use them to count things: 3 apples, 7 dogs, 42 stars. Natural numbers never include zero, fractions, or negatives.</p>
<div class="formula-box">
Natural Numbers = { 1, 2, 3, 4, 5, 6, 7, ... }
</div>
<div class="example-box">
<div class="label">Real-World Examples</div>
<p><strong>Natural numbers in daily life:</strong> counting money (5 dollars), measuring quantity (3 apples), expressing age (25 years old), house numbers (123 Main St). These are the numbers that feel most "natural" because we use them constantly for counting discrete things.</p>
</div>
<h3>Whole Numbers</h3>
<p>Take all the natural numbers and add <strong>zero</strong>. That is it -- you now have the whole numbers. Zero is special because it represents "nothing," but it is still a valid number.</p>
<div class="formula-box">
Whole Numbers = { 0, 1, 2, 3, 4, 5, 6, ... }
</div>
<h3>Integers</h3>
<p>Now extend whole numbers in the other direction -- add all the <strong>negative</strong> whole numbers. Integers include numbers like -3, -2, -1, 0, 1, 2, 3. No fractions, no decimals -- just clean whole values, both positive and negative.</p>
<div class="formula-box">
Integers = { ..., -3, -2, -1, 0, 1, 2, 3, ... }
</div>
<div class="tip-box">
<div class="label">Number Line</div>
<p>Picture a horizontal line stretching forever in both directions. Place 0 in the center. Positive numbers go to the right (1, 2, 3, ...) and negative numbers go to the left (-1, -2, -3, ...). Every integer sits at an exact point on this line, spaced evenly apart.</p>
<p style="font-family: monospace; text-align: center; color: #333333; margin-top: 0.5rem;">
... -4 -- -3 -- -2 -- -1 -- 0 -- 1 -- 2 -- 3 -- 4 ...
</p>
</div>
<h3>Rational Numbers</h3>
<p>A rational number is any number that can be written as a <strong>fraction</strong> of two integers (where the bottom number is not zero). This includes all integers (because 5 = 5/1), all fractions (like 3/4), and all terminating or repeating decimals (like 0.75 or 0.333...).</p>
<div class="formula-box">
Rational Number = a/b, where a and b are integers and b != 0
</div>
<div class="example-box">
<div class="label">Examples of Rational Numbers</div>
<ul>
<li><strong>1/2</strong> = 0.5 (a simple fraction)</li>
<li><strong>-3/4</strong> = -0.75 (negative fraction)</li>
<li><strong>7</strong> = 7/1 (every integer is rational)</li>
<li><strong>0.333...</strong> = 1/3 (repeating decimal)</li>
<li><strong>2.75</strong> = 11/4 (terminating decimal)</li>
</ul>
</div>
<h3>Irrational Numbers</h3>
<p>These are numbers that <strong>cannot</strong> be written as a fraction of two integers. Their decimal expansions go on forever without repeating. The most famous examples are pi and the square root of 2.</p>
<div class="example-box">
<div class="label">Examples of Irrational Numbers</div>
<ul>
<li><strong>pi</strong> = 3.14159265358979... (never ends, never repeats)</li>
<li><strong>sqrt(2)</strong> = 1.41421356... (the diagonal of a 1x1 square)</li>
<li><strong>sqrt(3)</strong> = 1.73205080...</li>
<li><strong>e</strong> = 2.71828182... (Euler's number, important in advanced math)</li>
</ul>
</div>
<h3>Real Numbers</h3>
<p>Put <strong>all</strong> rational and irrational numbers together and you get the real numbers. This is every possible point on the number line. Basically, if you can point to it on a number line, it is a real number.</p>
<div class="formula-box">
Real Numbers = Rational Numbers + Irrational Numbers
</div>
<h3>Summary Table</h3>
<table>
<thead>
<tr>
<th>Type</th>
<th>Includes</th>
<th>Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td>Natural</td>
<td>Positive counting numbers</td>
<td>1, 2, 3, 100, 9999</td>
</tr>
<tr>
<td>Whole</td>
<td>Natural numbers + zero</td>
<td>0, 1, 2, 3, 100</td>
</tr>
<tr>
<td>Integer</td>
<td>Whole numbers + negatives</td>
<td>-5, -1, 0, 3, 42</td>
</tr>
<tr>
<td>Rational</td>
<td>Any number expressible as a/b</td>
<td>1/2, -3, 0.75, 0.333...</td>
</tr>
<tr>
<td>Irrational</td>
<td>Non-repeating, non-terminating decimals</td>
<td>pi, sqrt(2), e</td>
</tr>
<tr>
<td>Real</td>
<td>All of the above combined</td>
<td>Everything on the number line</td>
</tr>
</tbody>
</table>
<div class="tip-box">
<div class="label">Think of it like nesting dolls</div>
<p>Natural numbers are inside whole numbers, which are inside integers, which are inside rational numbers, which are inside real numbers. Each set contains the previous one plus more.</p>
</div>
<div class="example-box">
<div class="label">Practice: Classifying Numbers</div>
<p>Try to classify these numbers (some fit multiple categories):</p>
<ul>
<li><strong>-5:</strong> Integer, rational, real (but not natural or whole)</li>
<li><strong>0:</strong> Whole, integer, rational, real (but not natural)</li>
<li><strong>1/2:</strong> Rational, real (but not natural, whole, or integer)</li>
<li><strong>π:</strong> Irrational, real (but nothing else)</li>
<li><strong>7:</strong> Natural, whole, integer, rational, real (fits all categories!)</li>
</ul>
<p><strong>Key insight:</strong> Every natural number is also whole, integer, rational, and real. But not every real number is natural.</p>
</div>
<div class="tip-box">
<div class="label">CS Connection: Data Types</div>
<p>In programming, you choose a <strong>data type</strong> based on what kind of number you need -- and this directly maps to the number types above:</p>
<ul>
<li><strong>Natural/Whole numbers</strong> → <code>unsigned int</code> in C++ (no negatives allowed, just 0 and up)</li>
<li><strong>Integers</strong> → <code>int</code>, <code>long</code> (positive and negative whole numbers)</li>
<li><strong>Rational numbers</strong> → <code>float</code>, <code>double</code> (numbers with decimal points)</li>
<li><strong>Irrational numbers</strong> → Also stored as <code>float</code>/<code>double</code>, but they get rounded because computers can't store infinite decimals. That's why <code>π</code> in code is 3.14159265... and stops at some point.</li>
</ul>
<p>Picking the wrong type causes real bugs. Storing a negative number in an <code>unsigned int</code> wraps it to a huge positive number. Storing money as a <code>float</code> causes rounding errors (use integers counting cents instead).</p>
</div>
</section>
<!-- ============================================================ -->
<!-- SECTION 2: TIMES TABLES -->
<!-- ============================================================ -->
<section id="times-tables">
<h2>2. Times Tables (Multiplication 1-12)</h2>
<p>Knowing your times tables by heart is like knowing the alphabet -- it makes everything else in math much easier. You don't want to be calculating 7 × 8 from scratch every time; you want it to be automatic. Let's master all multiplication facts from 1 to 12.</p>
<div class="tip-box">
<div class="label">How to Learn Times Tables</div>
<p><strong>The key is daily practice.</strong> Spend 5-10 minutes each day on times tables. Start with the easy ones (2s, 5s, 10s), then work your way up. Say them out loud. Write them down. Use the interactive quiz below every day until they become automatic.</p>
</div>
<h3>Complete Times Tables (1-12)</h3>
<p>Here's the full multiplication table. Notice the patterns -- the table is symmetrical because 3 × 7 = 7 × 3 (the commutative property).</p>
<div style="overflow-x: auto;">
<table style="font-size: 0.9rem; text-align: center;">
<thead>
<tr>
<th>×</th>
<th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th><th>10</th><th>11</th><th>12</th>
</tr>
</thead>
<tbody>
<tr><th>1</th><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td></tr>
<tr><th>2</th><td>2</td><td>4</td><td>6</td><td>8</td><td>10</td><td>12</td><td>14</td><td>16</td><td>18</td><td>20</td><td>22</td><td>24</td></tr>
<tr><th>3</th><td>3</td><td>6</td><td>9</td><td>12</td><td>15</td><td>18</td><td>21</td><td>24</td><td>27</td><td>30</td><td>33</td><td>36</td></tr>
<tr><th>4</th><td>4</td><td>8</td><td>12</td><td>16</td><td>20</td><td>24</td><td>28</td><td>32</td><td>36</td><td>40</td><td>44</td><td>48</td></tr>
<tr><th>5</th><td>5</td><td>10</td><td>15</td><td>20</td><td>25</td><td>30</td><td>35</td><td>40</td><td>45</td><td>50</td><td>55</td><td>60</td></tr>
<tr><th>6</th><td>6</td><td>12</td><td>18</td><td>24</td><td>30</td><td>36</td><td>42</td><td>48</td><td>54</td><td>60</td><td>66</td><td>72</td></tr>
<tr><th>7</th><td>7</td><td>14</td><td>21</td><td>28</td><td>35</td><td>42</td><td>49</td><td>56</td><td>63</td><td>70</td><td>77</td><td>84</td></tr>
<tr><th>8</th><td>8</td><td>16</td><td>24</td><td>32</td><td>40</td><td>48</td><td>56</td><td>64</td><td>72</td><td>80</td><td>88</td><td>96</td></tr>
<tr><th>9</th><td>9</td><td>18</td><td>27</td><td>36</td><td>45</td><td>54</td><td>63</td><td>72</td><td>81</td><td>90</td><td>99</td><td>108</td></tr>
<tr><th>10</th><td>10</td><td>20</td><td>30</td><td>40</td><td>50</td><td>60</td><td>70</td><td>80</td><td>90</td><td>100</td><td>110</td><td>120</td></tr>
<tr><th>11</th><td>11</td><td>22</td><td>33</td><td>44</td><td>55</td><td>66</td><td>77</td><td>88</td><td>99</td><td>110</td><td>121</td><td>132</td></tr>
<tr><th>12</th><td>12</td><td>24</td><td>36</td><td>48</td><td>60</td><td>72</td><td>84</td><td>96</td><td>108</td><td>120</td><td>132</td><td>144</td></tr>
</tbody>
</table>
</div>
<h3>Tricks and Patterns for Each Number</h3>
<h4>× 1 - The Identity</h4>
<p>Any number times 1 equals itself. <code>7 × 1 = 7</code>. This is the easiest table!</p>
<h4>× 2 - Doubling</h4>
<p>Double the number. <code>2 × 6 = 12</code> (just 6 + 6). If you can add, you can multiply by 2.</p>
<h4>× 3 - Double and Add</h4>
<p>Triple a number = double it + add the original. <code>3 × 7 = 14 + 7 = 21</code></p>
<h4>× 4 - Double Twice</h4>
<p>Double the number, then double the result. <code>4 × 6 = 2 × 12 = 24</code>. Or: <code>6 → 12 → 24</code></p>
<h4>× 5 - Half of 10</h4>
<p>Multiply by 10, then halve. <code>5 × 7 = 70 ÷ 2 = 35</code>. Or: results always end in 0 or 5.</p>
<h4>× 6 - Even Results</h4>
<p>When you multiply an even number by 6, the answer ends in the same digit. <code>6 × 2 = 12</code>, <code>6 × 4 = 24</code>, <code>6 × 6 = 36</code>, <code>6 × 8 = 48</code></p>
<h4>× 7 - The Hard One</h4>
<p>No easy trick -- just memorize. Focus on the tricky ones: <code>7 × 7 = 49</code>, <code>7 × 8 = 56</code>, <code>7 × 6 = 42</code>. Memory trick for 7 × 8: "5, 6, 7, 8" → 56 = 7 × 8</p>
<h4>× 8 - Double Three Times</h4>
<p>Double, double, double. <code>8 × 3 = 3 → 6 → 12 → 24</code>. Or use: <code>8 × n = 4 × n × 2</code></p>
<h4>× 9 - The Finger Trick</h4>
<p><strong>Magic pattern:</strong> For 9 × n, the digits add up to 9. <code>9 × 3 = 27</code> (2+7=9), <code>9 × 7 = 63</code> (6+3=9).</p>
<p><strong>Finger method:</strong> Hold up 10 fingers. To find 9 × 4, put down finger 4. Count fingers on each side: 3 on left, 6 on right = 36!</p>
<p><strong>Pattern:</strong> 9, 18, 27, 36, 45, 54, 63, 72, 81, 90. Notice the tens go up (0,1,2,3...) and units go down (9,8,7,6...).</p>
<h4>× 10 - Add a Zero</h4>
<p>Just add a 0 to the end. <code>10 × 7 = 70</code>. The easiest after × 1!</p>
<h4>× 11 - Repeat the Digit (up to 9)</h4>
<p>For single digits: <code>11 × 3 = 33</code>, <code>11 × 7 = 77</code>. For 10+: <code>11 × 12 = 132</code> (use normal multiplication or 12 × 10 + 12).</p>
<h4>× 12 - One Dozen</h4>
<p>Use: <code>12 × n = 10 × n + 2 × n</code>. Example: <code>12 × 7 = 70 + 14 = 84</code>.</p>
<div class="warning-box">
<div class="label">The Hardest Facts to Remember</div>
<p>These are the facts most people struggle with. Focus extra practice here:</p>
<ul>
<li><strong>7 × 8 = 56</strong> (Memory: 5, 6, 7, 8)</li>
<li><strong>6 × 7 = 42</strong></li>
<li><strong>6 × 8 = 48</strong></li>
<li><strong>7 × 9 = 63</strong></li>
<li><strong>8 × 9 = 72</strong></li>
<li><strong>12 × 7 = 84</strong></li>
<li><strong>12 × 8 = 96</strong></li>
</ul>
</div>
<h3>Daily Times Table Checker</h3>
<p>Practice makes perfect! Use this quiz every day. Try to answer in under 3 seconds per question.</p>
<div class="practice-quiz">
<div class="label">Daily Practice Quiz</div>
<div id="times-table-quiz">
<p id="quiz-question" class="quiz-question">Loading...</p>
<div style="text-align: center; margin: 1rem 0;">
<input type="number" id="quiz-answer" placeholder="Your answer">
<button onclick="checkAnswer()">Check</button>
</div>
<p id="quiz-feedback" style="text-align: center; font-size: 1.1rem; min-height: 1.5rem; font-weight: 600;"></p>
<p id="quiz-score" class="score">Score: 0 / 0 | Streak: 0</p>
<div style="text-align: center; margin-top: 1rem;">
<button onclick="newQuestion()" class="secondary">New Question</button>
<button onclick="resetQuiz()" class="secondary" style="margin-left: 0.5rem;">Reset Score</button>
</div>
<div style="margin-top: 1rem;">
<label style="color: #555555; font-weight: 500;">Table Range: </label>
<select id="table-range" onchange="newQuestion()">
<option value="12">1-12 (Full)</option>
<option value="5">1-5 (Beginner)</option>
<option value="10">1-10 (Standard)</option>
</select>
</div>
</div>
</div>
<script>
let currentA, currentB, score = 0, total = 0, streak = 0;
function getRandomInt(max) {
return Math.floor(Math.random() * max) + 1;
}
function newQuestion() {
const range = parseInt(document.getElementById('table-range').value);
currentA = getRandomInt(range);
currentB = getRandomInt(12);
document.getElementById('quiz-question').textContent = currentA + ' × ' + currentB + ' = ?';
document.getElementById('quiz-answer').value = '';
document.getElementById('quiz-feedback').textContent = '';
document.getElementById('quiz-answer').focus();
}
function checkAnswer() {
const userAnswer = parseInt(document.getElementById('quiz-answer').value);
const correctAnswer = currentA * currentB;
total++;
if (userAnswer === correctAnswer) {
score++;
streak++;
document.getElementById('quiz-feedback').innerHTML = '<span style="color: #000000;">✓ Correct!</span>';
} else {
streak = 0;
document.getElementById('quiz-feedback').innerHTML = '<span style="color: #888888;">✗ Wrong. ' + currentA + ' × ' + currentB + ' = ' + correctAnswer + '</span>';
}
document.getElementById('quiz-score').textContent = 'Score: ' + score + ' / ' + total + ' (' + Math.round(score/total*100) + '%) | Streak: ' + streak;
setTimeout(newQuestion, 1500);
}
function resetQuiz() {
score = 0;
total = 0;
streak = 0;
document.getElementById('quiz-score').textContent = 'Score: 0 / 0 | Streak: 0';
newQuestion();
}
// Handle Enter key
document.addEventListener('DOMContentLoaded', function() {
newQuestion();
document.getElementById('quiz-answer').addEventListener('keypress', function(e) {
if (e.key === 'Enter') checkAnswer();
});
});
</script>
<div class="tip-box">
<div class="label">Practice Strategy</div>
<p><strong>Daily goal:</strong> Get 20 questions right with at least 90% accuracy. Once you can do this consistently, you've mastered your times tables! Focus on speed -- aim to answer each question in under 3 seconds.</p>
</div>
<!-- ==================== TIMES TABLES PRACTICE ==================== -->
<h3>Practice Problems -- Times Tables</h3>
<p>Cover the answers. Write each answer down as fast as you can. Time yourself. Your goal: all correct in under 2 minutes.</p>
<h4>Set A: Rapid Fire</h4>
<div class="example-box">
<div class="label">Solve as fast as you can -- no calculator</div>
<p>1) 7 x 8 2) 6 x 9 3) 12 x 11 4) 8 x 6 5) 9 x 7</p>
<p>6) 4 x 12 7) 11 x 8 8) 3 x 9 9) 7 x 7 10) 6 x 6</p>
<p>11) 8 x 9 12) 12 x 7 13) 5 x 11 14) 9 x 9 15) 6 x 8</p>
</div>
<details>
<summary><strong>Click to reveal answers -- Set A</strong></summary>
<div class="example-box">
<p>1) <strong>56</strong> 2) <strong>54</strong> 3) <strong>132</strong> 4) <strong>48</strong> 5) <strong>63</strong></p>
<p>6) <strong>48</strong> 7) <strong>88</strong> 8) <strong>27</strong> 9) <strong>49</strong> 10) <strong>36</strong></p>
<p>11) <strong>72</strong> 12) <strong>84</strong> 13) <strong>55</strong> 14) <strong>81</strong> 15) <strong>48</strong></p>
</div>
</details>
<h4>Set B: The Tricky Ones (Most Commonly Missed)</h4>
<div class="example-box">
<div class="label">These are the ones people get wrong most. Drill them.</div>
<p>1) 7 x 6 2) 8 x 7 3) 9 x 6 4) 12 x 8 5) 11 x 7</p>
<p>6) 9 x 8 7) 7 x 9 8) 6 x 12 9) 8 x 8 10) 12 x 9</p>
<p>11) 7 x 12 12) 9 x 11 13) 8 x 12 14) 6 x 7 15) 11 x 12</p>
</div>
<details>
<summary><strong>Click to reveal answers -- Set B</strong></summary>
<div class="example-box">
<p>1) <strong>42</strong> 2) <strong>56</strong> 3) <strong>54</strong> 4) <strong>96</strong> 5) <strong>77</strong></p>
<p>6) <strong>72</strong> 7) <strong>63</strong> 8) <strong>72</strong> 9) <strong>64</strong> 10) <strong>108</strong></p>
<p>11) <strong>84</strong> 12) <strong>99</strong> 13) <strong>96</strong> 14) <strong>42</strong> 15) <strong>132</strong></p>
</div>
</details>
<h4>Set C: Division (Reverse Times Tables)</h4>
<div class="example-box">
<div class="label">If you know multiplication, you know division. Solve these.</div>
<p>1) 56 / 8 2) 72 / 9 3) 48 / 6 4) 81 / 9 5) 132 / 11</p>
<p>6) 63 / 7 7) 96 / 12 8) 54 / 6 9) 84 / 7 10) 108 / 9</p>
</div>
<details>
<summary><strong>Click to reveal answers -- Set C</strong></summary>
<div class="example-box">
<p>1) <strong>7</strong> 2) <strong>8</strong> 3) <strong>8</strong> 4) <strong>9</strong> 5) <strong>12</strong></p>
<p>6) <strong>9</strong> 7) <strong>8</strong> 8) <strong>9</strong> 9) <strong>12</strong> 10) <strong>12</strong></p>
</div>
</details>
<div class="tip-box">
<div class="label">Where to Practice More -- Times Tables</div>
<ul>
<li><strong><a href="https://www.timestables.co.uk/" target="_blank">TimeTables.co.uk</a></strong> -- Speed tests, games, and printable worksheets. The best dedicated times tables site.</li>
<li><strong><a href="https://www.topmarks.co.uk/maths-games/hit-the-button" target="_blank">Hit the Button</a></strong> -- Fast-paced interactive game to build speed and recall.</li>
<li><strong><a href="https://www.mathsisfun.com/timestable.html" target="_blank">Math is Fun -- Times Tables</a></strong> -- Interactive table trainer with speed tests.</li>
<li><strong><a href="https://multiply.vexflow.com/" target="_blank">Multiplication Trainer</a></strong> -- Minimal, distraction-free drill that tracks your weakest facts.</li>
</ul>
</div>
</section>
<!-- ============================================================ -->
<!-- SECTION 3: ORDER OF OPERATIONS -->
<!-- ============================================================ -->
<section id="order-of-operations">
<h2>3. Order of Operations (BODMAS / PEMDAS)</h2>
<p>When you see an expression like <strong>3 + 4 x 2</strong>, do you add first or multiply first? The answer matters -- and getting it wrong is one of the most common mistakes in math. The order of operations tells you <em>exactly</em> which calculations to do first.</p>
<p>There are two popular acronyms. They mean the same thing, just different words:</p>
<table>
<thead>
<tr>
<th>BODMAS</th>
<th>PEMDAS</th>
<th>Meaning</th>
<th>Priority</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>B</strong>rackets</td>
<td><strong>P</strong>arentheses</td>
<td>Solve inside ( ) first</td>
<td>1st (highest)</td>
</tr>
<tr>
<td><strong>O</strong>rders</td>
<td><strong>E</strong>xponents</td>
<td>Powers and roots (x^2, sqrt)</td>
<td>2nd</td>
</tr>
<tr>
<td><strong>D</strong>ivision</td>
<td><strong>M</strong>ultiplication</td>
<td rowspan="2">Multiply and divide, left to right</td>
<td rowspan="2">3rd (equal priority)</td>
</tr>
<tr>
<td><strong>M</strong>ultiplication</td>
<td><strong>D</strong>ivision</td>
</tr>
<tr>
<td><strong>A</strong>ddition</td>
<td><strong>A</strong>ddition</td>
<td rowspan="2">Add and subtract, left to right</td>
<td rowspan="2">4th (equal priority)</td>
</tr>
<tr>
<td><strong>S</strong>ubtraction</td>
<td><strong>S</strong>ubtraction</td>
</tr>
</tbody>
</table>
<div class="tip-box">
<div class="label">Key Rule</div>
<p>Multiplication and division have <strong>equal</strong> priority -- you do them left to right. Same for addition and subtraction. It is NOT "multiply before divide." It is "multiplication and division together, left to right."</p>
</div>
<h3>Worked Examples</h3>
<div class="example-box">
<div class="label">Example 1 -- Simple</div>
<p><strong>Solve: 3 + 4 x 2</strong></p>
<p>Step 1: Multiplication first: 4 x 2 = 8</p>
<p>Step 2: Then addition: 3 + 8 = <strong>11</strong></p>
<p>(Not 14! A common mistake is doing 3 + 4 = 7 first.)</p>
</div>
<div class="example-box">
<div class="label">Example 2 -- With Brackets</div>
<p><strong>Solve: (3 + 4) x 2</strong></p>
<p>Step 1: Brackets first: 3 + 4 = 7</p>
<p>Step 2: Then multiply: 7 x 2 = <strong>14</strong></p>
</div>
<div class="example-box">
<div class="label">Example 3 -- Multiple Operations</div>
<p><strong>Solve: 10 - 3 x 2 + 8 / 4</strong></p>
<p>Step 1: Multiplication: 3 x 2 = 6</p>
<p>Step 2: Division: 8 / 4 = 2</p>
<p>Step 3: Now left to right: 10 - 6 + 2 = 4 + 2 = <strong>6</strong></p>
</div>
<div class="example-box">
<div class="label">Example 4 -- With Exponents</div>
<p><strong>Solve: 2 + 3^2 x 4</strong></p>
<p>Step 1: Exponent first: 3^2 = 9</p>
<p>Step 2: Multiplication: 9 x 4 = 36</p>
<p>Step 3: Addition: 2 + 36 = <strong>38</strong></p>
</div>
<div class="example-box">
<div class="label">Example 5 -- Complex</div>
<p><strong>Solve: 5 x (6 - 2)^2 + 12 / 3 - 1</strong></p>
<p>Step 1: Brackets: 6 - 2 = 4</p>
<p>Step 2: Exponent: 4^2 = 16</p>
<p>Step 3: Multiplication: 5 x 16 = 80</p>
<p>Step 4: Division: 12 / 3 = 4</p>
<p>Step 5: Left to right: 80 + 4 - 1 = <strong>83</strong></p>
</div>
<div class="warning-box">
<div class="label">Common Mistakes to Avoid</div>
<ul>
<li><strong>Adding before multiplying:</strong> In "3 + 4 x 2", you must multiply first. The answer is 11, not 14.</li>
<li><strong>Thinking M comes before D:</strong> Multiplication and division have equal priority. Do them left to right. In "12 / 4 x 3", you divide first (left to right): 3 x 3 = 9, not 12 / 12 = 1.</li>
<li><strong>Forgetting nested brackets:</strong> In "2 x (3 + (4 - 1))", solve the innermost brackets first: 4 - 1 = 3, then 3 + 3 = 6, then 2 x 6 = 12.</li>
<li><strong>Ignoring exponents:</strong> In "2 x 3^2", the exponent applies to 3 only (not 2 x 3). So it is 2 x 9 = 18, not 6^2 = 36.</li>
</ul>
</div>
<div class="example-box">
<div class="label">More Practice Examples</div>
<p><strong>Practice these step-by-step:</strong></p>
<p><strong>1) 2 + 3 x 4^2 - 1</strong><br>
Step 1: Exponent: 4^2 = 16<br>
Step 2: Multiply: 3 x 16 = 48<br>
Step 3: Left to right: 2 + 48 - 1 = 50 - 1 = <strong>49</strong></p>
<p><strong>2) (8 - 3) x 2 + 10 / 5</strong><br>
Step 1: Brackets: 8 - 3 = 5<br>
Step 2: Multiply: 5 x 2 = 10<br>
Step 3: Divide: 10 / 5 = 2<br>
Step 4: Add: 10 + 2 = <strong>12</strong></p>
<p><strong>3) 15 / 3 x 2 - 4</strong><br>
Step 1: Division first (left to right): 15 / 3 = 5<br>
Step 2: Then multiply: 5 x 2 = 10<br>
Step 3: Subtract: 10 - 4 = <strong>6</strong></p>
</div>
<div class="tip-box">
<div class="label">Memory Trick</div>
<p>Remember BODMAS with: "<strong>B</strong>ig <strong>O</strong>ld <strong>D</strong>ogs <strong>M</strong>ust <strong>A</strong>lways <strong>S</strong>leep" or "<strong>P</strong>lease <strong>E</strong>xcuse <strong>M</strong>y <strong>D</strong>ear <strong>A</strong>unt <strong>S</strong>ally" (PEMDAS). But remember: MD and AS are equal priority, left to right!</p>
</div>
<div class="tip-box">
<div class="label">CS Connection: How Your Code Evaluates Expressions</div>
<p>Compilers and interpreters follow <strong>exactly</strong> the same rules. When you write:</p>
<div class="formula-box">int result = 3 + 4 * 2; // result = 11, NOT 14</div>
<p>The compiler does multiplication first, just like BODMAS says. This is called <strong>operator precedence</strong>. Every language has a precedence table -- and it matches the math you just learned. If you want addition first, you use parentheses: <code>(3 + 4) * 2 = 14</code>. This is also why complex boolean expressions like <code>a || b && c</code> can surprise you -- <code>&&</code> has higher precedence than <code>||</code>, just like <code>*</code> beats <code>+</code>.</p>
</div>
<!-- ==================== ORDER OF OPERATIONS PRACTICE ==================== -->
<h3>Practice Problems -- Order of Operations</h3>
<p>Evaluate each expression. Show every step. Remember: Brackets first, then Exponents, then Multiplication/Division (left to right), then Addition/Subtraction (left to right).</p>
<h4>Set A: Basic BODMAS</h4>
<div class="example-box">
<div class="label">Evaluate each expression</div>
<p>1) 3 + 4 x 2</p>
<p>2) 10 - 2 x 3</p>
<p>3) 8 / 4 + 6</p>
<p>4) 15 - 6 / 2</p>
<p>5) 2 + 3 x 4 - 1</p>
<p>6) 20 / 5 + 3 x 2</p>
<p>7) 7 x 3 - 4 x 2</p>
<p>8) 36 / 6 / 3</p>
<p>9) 5 + 10 / 2 - 3</p>
<p>10) 8 x 2 + 12 / 4 - 5</p>
</div>
<details>
<summary><strong>Click to reveal answers -- Set A</strong></summary>
<div class="example-box">
<p>1) 3 + 8 = <strong>11</strong></p>
<p>2) 10 - 6 = <strong>4</strong></p>
<p>3) 2 + 6 = <strong>8</strong></p>
<p>4) 15 - 3 = <strong>12</strong></p>
<p>5) 2 + 12 - 1 = <strong>13</strong></p>
<p>6) 4 + 6 = <strong>10</strong></p>
<p>7) 21 - 8 = <strong>13</strong></p>
<p>8) 6 / 3 = <strong>2</strong> (left to right)</p>
<p>9) 5 + 5 - 3 = <strong>7</strong></p>
<p>10) 16 + 3 - 5 = <strong>14</strong></p>
</div>
</details>
<h4>Set B: With Brackets</h4>
<div class="example-box">
<div class="label">Evaluate each expression</div>
<p>1) (3 + 4) x 2</p>
<p>2) 5 x (8 - 3)</p>
<p>3) (12 + 8) / (4 + 1)</p>
<p>4) 3 x (2 + 5) - 4</p>
<p>5) (9 - 3) x (4 + 2)</p>
<p>6) 100 / (4 x 5)</p>
<p>7) (7 + 3) x (10 - 6) / 2</p>
<p>8) 2 x (3 + 4 x 2)</p>
<p>9) ((6 + 2) x 3 - 4) / 5</p>
<p>10) 50 - 3 x (8 + 2) + 4</p>
</div>
<details>
<summary><strong>Click to reveal answers -- Set B</strong></summary>
<div class="example-box">
<p>1) 7 x 2 = <strong>14</strong></p>
<p>2) 5 x 5 = <strong>25</strong></p>
<p>3) 20 / 5 = <strong>4</strong></p>
<p>4) 3 x 7 - 4 = 21 - 4 = <strong>17</strong></p>
<p>5) 6 x 6 = <strong>36</strong></p>
<p>6) 100 / 20 = <strong>5</strong></p>
<p>7) 10 x 4 / 2 = 40 / 2 = <strong>20</strong></p>
<p>8) Inside bracket: 3 + 8 = 11. Then 2 x 11 = <strong>22</strong></p>
<p>9) Inner: 8 x 3 = 24. Then 24 - 4 = 20. Then 20/5 = <strong>4</strong></p>
<p>10) 50 - 3 x 10 + 4 = 50 - 30 + 4 = <strong>24</strong></p>
</div>
</details>
<h4>Set C: With Exponents</h4>
<div class="example-box">
<div class="label">Evaluate each expression</div>
<p>1) 2^3 + 4</p>
<p>2) 3^2 x 2</p>
<p>3) 5 + 2^4 / 4</p>
<p>4) (2 + 3)^2</p>
<p>5) 2^3 + 3^2</p>
<p>6) 10 - 2^3 + 1</p>
<p>7) (4 + 1)^2 - 3 x 5</p>
<p>8) 3^3 / 9 + 2^2</p>
<p>9) 100 - (2^2 + 3)^2</p>
<p>10) 2^(1+2) x 3 - 4^2</p>
</div>
<details>
<summary><strong>Click to reveal answers -- Set C</strong></summary>
<div class="example-box">
<p>1) 8 + 4 = <strong>12</strong></p>
<p>2) 9 x 2 = <strong>18</strong></p>
<p>3) 5 + 16/4 = 5 + 4 = <strong>9</strong></p>
<p>4) 5^2 = <strong>25</strong></p>
<p>5) 8 + 9 = <strong>17</strong></p>
<p>6) 10 - 8 + 1 = <strong>3</strong></p>
<p>7) 25 - 15 = <strong>10</strong></p>
<p>8) 27/9 + 4 = 3 + 4 = <strong>7</strong></p>
<p>9) 100 - (4+3)^2 = 100 - 49 = <strong>51</strong></p>
<p>10) 2^3 x 3 - 16 = 8 x 3 - 16 = 24 - 16 = <strong>8</strong></p>
</div>
</details>
<div class="tip-box">
<div class="label">Where to Practice More -- Order of Operations</div>
<ul>
<li><strong><a href="https://www.khanacademy.org/math/cc-sixth-grade-math/cc-6th-arithmetic-operations/cc-6th-order-of-operations/e/order_of_operations" target="_blank">Khan Academy -- Order of Operations</a></strong> -- Unlimited practice with instant feedback.</li>
<li><strong><a href="https://www.mathsgenie.co.uk/orderofoperations.html" target="_blank">Maths Genie -- BODMAS</a></strong> -- GCSE-style worksheets with answers.</li>
<li><strong><a href="https://www.mathsisfun.com/operation-order-bodmas.html" target="_blank">Math is Fun -- Order of Operations</a></strong> -- Clear explanation with practice exercises.</li>
<li><strong><a href="https://corbettmaths.com/contents/" target="_blank">Corbett Maths</a></strong> -- Search "order of operations" for video and practice questions.</li>
</ul>
</div>
</section>
<!-- ============================================================ -->
<!-- SECTION 3: FRACTIONS -->
<!-- ============================================================ -->
<section id="fractions">
<h2>3. Fractions</h2>
<p>A fraction represents a <strong>part of a whole</strong>. If you cut a pizza into 4 equal slices and eat 1, you have eaten 1/4 of the pizza. The top number (<strong>numerator</strong>) tells you how many parts you have. The bottom number (<strong>denominator</strong>) tells you how many equal parts the whole was divided into.</p>
<div class="formula-box">
Fraction = Numerator / Denominator
</div>
<p>But here's what people often miss: <strong>a fraction is also a division</strong>. The fraction 3/4 literally means "3 divided by 4." The fraction bar IS a division sign. Once this clicks, fractions stop being scary -- they're just division you haven't done yet.</p>
<div class="memory-diagram">
What 3/4 really means:
┌──────────────────────────────┐
│ A whole bar │
└──────────────────────────────┘
Split into 4 equal parts:
┌───────┬───────┬───────┬───────┐
│ 1/4 │ 1/4 │ 1/4 │ 1/4 │
└───────┴───────┴───────┴───────┘
Take 3 of them (that's 3/4):
┌───────┬───────┬───────┐───────┐
│███████│███████│███████│ │
└───────┴───────┴───────┘───────┘
◄────── 3/4 ──────► 1/4
3/4 = 3 ÷ 4 = 0.75
</div>
<div class="tip-box">
<div class="label">The Key Insight</div>
<p>The <strong>denominator</strong> (bottom) tells you what SIZE the pieces are. The <strong>numerator</strong> (top) tells you HOW MANY pieces you have. A bigger denominator means SMALLER pieces (cutting into more slices makes each one thinner). This is why 1/8 is smaller than 1/4 -- eighths are tinier pieces than quarters.</p>
</div>
<h3>Types of Fractions</h3>
<table>
<thead>
<tr>
<th>Type</th>
<th>Definition</th>
<th>Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td>Proper</td>
<td>Numerator is smaller than denominator (less than 1)</td>
<td>1/2, 3/4, 7/10</td>
</tr>
<tr>
<td>Improper</td>
<td>Numerator is equal to or larger than denominator (1 or more)</td>
<td>5/3, 9/4, 7/7</td>
</tr>
<tr>
<td>Mixed Number</td>
<td>A whole number combined with a proper fraction</td>
<td>1 2/3, 3 1/4, 2 5/8</td>
</tr>
</tbody>
</table>
<div class="example-box">
<div class="label">Converting Improper to Mixed</div>
<p><strong>Convert 7/3 to a mixed number:</strong></p>
<p>Step 1: Divide 7 by 3: 7 / 3 = 2 remainder 1</p>
<p>Step 2: The whole number is 2, the remainder goes over the denominator: <strong>2 1/3</strong></p>
</div>
<div class="example-box">
<div class="label">Converting Mixed to Improper</div>
<p><strong>Convert 3 2/5 to an improper fraction:</strong></p>
<p>Step 1: Multiply whole number by denominator: 3 x 5 = 15</p>
<p>Step 2: Add the numerator: 15 + 2 = 17</p>
<p>Step 3: Put over original denominator: <strong>17/5</strong></p>
</div>
<h3>Equivalent Fractions</h3>
<p>Equivalent fractions look different but represent the same value. You create them by multiplying (or dividing) the numerator and denominator by the same number.</p>
<div class="example-box">
<div class="label">Example</div>
<p>1/2 = 2/4 = 3/6 = 4/8 = 50/100</p>
<p>All of these equal one half. We multiplied top and bottom by the same number each time.</p>
</div>
<h3>Simplifying Fractions</h3>
<p>To simplify a fraction, divide both the numerator and denominator by their <strong>Greatest Common Divisor (GCD)</strong> -- the largest number that divides both evenly.</p>
<div class="example-box">
<div class="label">Example -- Simplify 12/18</div>
<p>Step 1: Find the GCD of 12 and 18. Factors of 12: 1, 2, 3, 4, 6, 12. Factors of 18: 1, 2, 3, 6, 9, 18. GCD = 6.</p>
<p>Step 2: Divide both by 6: 12/6 = 2, 18/6 = 3</p>
<p>Result: <strong>12/18 = 2/3</strong></p>
</div>
<div class="tip-box">
<div class="label">Easy Way to Find GCD</div>
<p>If you struggle with finding factors, try this: start with the smaller number and work down. Does 12 divide both 12 and 18? No (18/12 = 1.5). Does 6? Yes (12/6 = 2, 18/6 = 3). So 6 is the GCD. Or use trial division: try 2, then 3, then 4, etc.</p>
</div>
<div class="example-box">
<div class="label">More Fraction Simplification Practice</div>
<p><strong>Simplify these fractions:</strong></p>
<p><strong>1) 6/9:</strong> Both divide by 3 → 6/9 = 2/3</p>
<p><strong>2) 15/25:</strong> Both divide by 5 → 15/25 = 3/5</p>
<p><strong>3) 8/12:</strong> Both divide by 4 → 8/12 = 2/3</p>
<p><strong>4) 10/15:</strong> Both divide by 5 → 10/15 = 2/3</p>
<p><strong>Common pattern:</strong> Look for numbers both top and bottom can be divided by evenly.</p>
</div>
<!-- COMPARING FRACTIONS -->
<h3>Comparing Fractions -- Which is Bigger?</h3>
<p>This trips people up, but there are simple methods.</p>
<p><strong>Method 1: Same denominator.</strong> If the denominators match, the bigger numerator wins.</p>
<div class="formula-box">
3/7 vs 5/7 → 5/7 is bigger (same size pieces, but more of them)
</div>
<p><strong>Method 2: Same numerator.</strong> If the numerators match, the SMALLER denominator wins (bigger pieces).</p>
<div class="formula-box">
3/4 vs 3/8 → 3/4 is bigger (quarters are bigger than eighths)
</div>
<p><strong>Method 3: Cross multiply.</strong> Works for ANY two fractions. Multiply diagonally and compare.</p>
<div class="example-box">
<div class="label">Example: Is 3/5 or 2/3 bigger?</div>
<p>Cross multiply: 3 × 3 = 9 (left side) vs 2 × 5 = 10 (right side)</p>
<p>10 > 9, so the right fraction wins: <strong>2/3 > 3/5</strong></p>
<p>Check with decimals: 3/5 = 0.6, 2/3 = 0.667 ✓</p>
</div>
<div class="example-box">
<div class="label">Example: Is 5/8 or 7/12 bigger?</div>
<p>Cross multiply: 5 × 12 = 60 vs 7 × 8 = 56</p>
<p>60 > 56, so <strong>5/8 > 7/12</strong></p>
</div>
<div class="memory-diagram">
Visual comparison of 3/5 vs 2/3: