A teacher's guide

Common Mistakes Students Make in Coding, Maths and Physics

Most lost marks in coding, maths and physics do not come from the hard topics. They come from a small set of mistakes that turn up in every year group, from a first Python lesson to a final physics exam. Here are the ones our teachers see most often in live classes, what each one looks like in a real student's work, and the habit that fixes it.

In short

In coding, the most common mistakes are off-by-one errors in loops, confusing = with ==, and writing a whole program before testing any part of it. In maths, they are sign errors when expanding brackets, writing (a + b)² as a² + b², and cancelling terms instead of factors; in physics, they are mixing up mass and weight, believing a moving object needs a force to keep it moving, and forgetting to convert units. Across all three subjects, the biggest single cause is rushing to an answer without reading the question properly or checking the result.

Coding

Coding mistakes

Coding mistakes are rarely about intelligence. They usually come from assuming the computer will do what you meant rather than what you wrote. Each of these has a habit that catches it early, long before it becomes an hour of frustrated debugging.

01

Off-by-one errors in loops and ranges

What it looks likeA student wants to print the numbers 1 to 10, writes range(1, 10) and gets 1 to 9. Or a loop over a list reaches one index too far and Python raises an IndexError.

Why it happensPython's range stops just before the end value, which feels unnatural at first. Counting is also harder than it looks: a 10 metre fence with a post every metre needs 11 posts, not 10. Students guess the boundary instead of checking it.

The fixBefore running a loop, say out loud the first and last value it should produce, then check them with a quick print. Remember that range(a, b) gives b minus a values, starting at a. When looping over a list, prefer for item in my_list over juggling indexes yourself.

Wrongfor i in range(1, 10): # meant 1 to 10Rightfor i in range(1, 11): # gives 1 to 10
02

Confusing = with ==

What it looks likeA student writes if score = 10: and Python stops with a SyntaxError they cannot explain. The opposite slip, writing total == total + 5 on its own line, runs without any error but never changes total.

Why it happensIn maths lessons the equals sign means "is the same as", so students carry that meaning into code. In Python, = stores a value in a variable and == asks a question that comes back True or False. Mixing them up either breaks the code or quietly does nothing.

The fixRead = as "becomes" and == as "is equal to?" when you say your code out loud. Any line starting with if, elif or while needs a comparison, so look for == there. If a line with == is not inside a condition, it is almost certainly a mistake.

Wrongif score = 10:Rightif score == 10:
03

Copying a list with = and getting two names for one list

What it looks likeA student writes backup = scores, then changes backup, and is surprised when the original scores list changes too. A related surprise: a function with a default argument of [] remembers items from earlier calls.

Why it happensIn Python, = does not copy a list. It gives the same list a second name, so both names point at one object. A default value like bag=[] is created once when the function is defined, so every call shares it.

The fixWhen you want a separate copy, say so: use scores.copy() or list(scores). For function defaults, use None and create the new list inside the function. If something changes that you did not touch, ask yourself which other name points at the same object.

Wrongbackup = scoresRightbackup = scores.copy()
04

Writing the whole program before running any of it

What it looks likeA student types sixty lines for a quiz game, runs it for the first time, and gets three errors and a wrong score. They have no idea which part is broken, so they start changing things at random.

Why it happensRunning code feels like a final step, so students save it for the end. But every untested line is a place a bug can hide, and bugs interact with each other. The longer you wait, the harder each one is to find.

The fixWrite a few lines, run them, and check the output before writing more. Add a temporary print to see what a variable holds at each stage, then remove it once that part works. Small working steps are faster overall than one big untested leap.

Rightprint("after loop, total =", total)
05

Ignoring the error message

What it looks likePython prints a red TypeError and the student closes it straight away, or asks "why doesn't it work?" without having read it. Often the message says exactly which line failed and why.

Why it happensError messages look long and alarming, so beginners treat them as noise. They also tend to read from the top, but the most useful part, the line number and the error type, is at the bottom. A very common case is input() returning text, so adding it to a number fails.

The fixRead the last line of the error first: it names the problem. Then find the line number above it and look at that exact line. Copy the error type into your notes so you recognise it next time, and remember that input() always gives you a string until you convert it with int() or float().

Wrongage = input("Age? ") + 1Rightage = int(input("Age? ")) + 1
06

Forgetting edge cases

What it looks likeA program that averages marks works perfectly in class, then crashes with ZeroDivisionError when the list is empty. Or a check like if x > 0 is treated as covering every number, forgetting that 0 is neither positive nor negative.

Why it happensStudents test with the friendly example in the question and stop there because it works. Real inputs include empty lists, zero, negative numbers, very large values and text where a number was expected. Code that runs is not the same as code that works.

The fixAfter the normal test, always try the awkward ones: empty, zero, negative, one item, and very large. Decide what the program should do in each case, then write that into the code. Edge case thinking is one of the clearest signs of a strong programmer.

Wrongaverage = sum(marks) / len(marks)Rightaverage = sum(marks) / len(marks) if marks else 0

Test yourself on today's coding question →

Maths

Maths mistakes

Most lost marks in maths are not about hard topics. They are small slips in algebra and arithmetic that repeat, plus a habit of trusting a half-remembered formula. The good news is that each one has a quick check that catches it.

07

Sign errors when expanding brackets

What it looks likeA student expands 3 - 2(x - 4) and writes 3 - 2x - 8. Everything after that line is correct algebra on a wrong expression, so the final answer is wrong.

Why it happensThe minus sign in front of the bracket belongs to the 2, so it multiplies every term inside, including the -4. Students multiply the first term carefully and then rush the second. It happens most when the bracket starts with a minus sign outside it.

The fixTreat the sign as part of the number: write -2(x - 4) and multiply -2 by each term separately, writing both products down. Minus times minus gives plus. Check by putting a simple value like x = 0 into both the original and your expanded version.

Wrong3 - 2(x - 4) = 3 - 2x - 8Right3 - 2(x - 4) = 3 - 2x + 8
08

Writing (a + b)² as a² + b²

What it looks likeA student squares (x + 3) and writes x² + 9. The same idea shows up as √(a² + b²) = a + b, which breaks Pythagoras questions.

Why it happensSquaring looks like it should apply to each part, the way multiplying a bracket by a number does. But (x + 3)² means (x + 3)(x + 3), and multiplying that out gives a middle term. Students who learned the rule as a pattern, rather than as multiplication, lose that middle term.

The fixAlways write the square as two brackets and multiply them out, at least until it becomes automatic. Then test with numbers: if x = 1, (1 + 3)² is 16, but 1² + 9 is only 10. A quick number check exposes the mistake in seconds.

Wrong(x + 3)² = x² + 9Right(x + 3)² = x² + 6x + 9
09

Cancelling terms instead of factors

What it looks likeA student simplifies (x² + 5)/x by crossing out an x on top and bottom and writes x + 5. Or they cancel the x in (x + 6)/(x + 3) and get 6/3 = 2.

Why it happensCancelling works on things that are multiplied, not things that are added. Students learn cancelling with simple fractions like 6x/3x, where it works, and then apply the same move to sums. The page looks tidier, so the mistake feels like progress.

The fixBefore cancelling, ask: is this a factor of the whole top and the whole bottom? If there is a + or - in the way, factorise first or split the fraction into parts. Check by putting in a number such as x = 2 and comparing the two versions.

Wrong(x² + 5)/x = x + 5Right(x² + 5)/x = x + 5/x
10

Getting the order of operations wrong (BIDMAS / PEMDAS)

What it looks likeA student works out 6 ÷ 2 × 3 as 6 ÷ 6 = 1. Another writes -3² = 9 when the answer is -9.

Why it happensBIDMAS and PEMDAS make it sound as if division always comes before multiplication, or multiplication before division. In fact they share one level and are done left to right, and the same goes for addition and subtraction. The power in -3² applies only to the 3, not to the minus sign.

The fixLearn the rule as levels: brackets, then powers, then multiplication and division from left to right, then addition and subtraction from left to right. When in doubt, add your own brackets to make the order clear. Write -3² as -(3²) and (-3)² as two different things.

Wrong6 ÷ 2 × 3 = 1Right6 ÷ 2 × 3 = 3 × 3 = 9
11

Not checking the answer

What it looks likeA student solves 2x + 5 = 17, gets x = 11, and moves on. Putting 11 back in gives 27, not 17, but they never tried.

Why it happensFinishing feels like the end of the job, especially under time pressure. Many students also see checking as something only weaker students need. In reality, checking is the fastest way to turn a wrong answer into a right one.

The fixSubstitute your answer back into the original equation, not your working, because your working may contain the mistake. Also ask whether the size makes sense: a negative length or a probability above 1 means something went wrong. Leave a minute at the end of every test for this.

Wrong2x + 5 = 17, so x = 11Rightx = 6, check: 2(6) + 5 = 17 ✓
12

Memorising formulas instead of understanding them

What it looks likeA student remembers the quadratic formula as (b ± √(b² - 4ac))/2a, missing the minus sign in front of b. When a question is worded slightly differently from the textbook, they do not know which formula to use.

Why it happensMemorising feels efficient before a test, but a formula you do not understand has no way to check itself. Under exam pressure, half-remembered formulas lose a sign or a power. Students who only know the formula are stuck when the problem changes shape.

The fixLearn where each formula comes from, even roughly: the quadratic formula comes from completing the square. Then test it on an easy case you already know, such as x² - 5x + 6 = 0, which should give 2 and 3. If you forget the formula but know the idea, you can rebuild it.

Wrongx = (b ± √(b² - 4ac)) / 2aRightx = (-b ± √(b² - 4ac)) / 2a

Test yourself on today's maths question →

Physics

Physics mistakes

Physics mistakes often come from everyday intuition, which was built in a world full of friction and air resistance. Students also tend to grab a formula before they understand the situation. In our Circuits physics classes, we see the same handful again and again, and each has a clear fix.

13

Mixing up mass and weight

What it looks likeA student writes "the weight of the box is 5 kg" and then uses 5 as the force in F = ma. Or they say an astronaut's mass is smaller on the Moon.

Why it happensIn everyday speech, people say they "weigh" a number of kilograms, so the two words blur together. In physics, mass is the amount of matter, measured in kilograms, and it does not change from place to place. Weight is the gravitational force on that mass, measured in newtons, and it does change.

The fixCheck the unit every time: kg means mass, N means weight or another force. To get weight, multiply mass by g, which is about 9.8 N/kg on Earth. On the Moon your mass stays the same but your weight is about a sixth as big.

WrongWeight of the box = 5 kgRightMass 5 kg, weight = 5 × 9.8 = 49 N
14

Thinking a moving object needs a force to keep it moving

What it looks likeAsked for the forces on a ball thrown upwards, a student draws gravity downwards and an upward "force of the throw". Or they say a spacecraft needs its engines on to keep travelling at a steady speed.

Why it happensOn Earth, things slow down when you stop pushing, so it feels as though motion needs a force. That slowing is caused by friction and air resistance, not by the push running out. Newton's first law says an object keeps moving at the same speed in a straight line unless a resultant force acts on it.

The fixList only forces that something is actively applying right now, and name what applies each one. Once the ball leaves the hand, the hand is no longer touching it, so there is no throw force. A resultant force changes motion: it speeds things up, slows them down or changes their direction.

WrongBall rising: gravity down, throw force upRightBall rising: only gravity, acting down
15

Thinking current gets used up in a circuit

What it looks likeA student says the current is bigger before a bulb than after it in a series circuit, because the bulb "uses up" some of the current. They predict that a second ammeter after the bulb will read less.

Why it happensSomething is clearly used up, because the bulb lights and the battery eventually goes flat. But what the bulb takes is energy, not charge. Charge flows all the way round and returns to the battery, so in a series circuit the current is the same at every point.

The fixKeep two ideas separate: current is the rate of flow of charge, and potential difference is the energy transferred per unit of charge. In a series circuit, current is the same everywhere while the potential difference is shared between components. When you are unsure, imagine ammeters at several points and remember they all agree in series.

Wrong2 A before the bulb, 1 A after itRightSeries circuit: 2 A before and 2 A after
16

Forgetting units and not converting them

What it looks likeA student calculates the kinetic energy of a 2 kg object at 72 km/h by putting 72 straight into ½mv², then gets 5184 J instead of 400 J. Another uses grams in F = ma and gets a force a thousand times too big.

Why it happensQuestions often give values in everyday units like km/h, grams, minutes or centimetres to test exactly this. The standard equations only work in SI units: metres, kilograms, seconds. Students who write numbers without units cannot see that something is off.

The fixConvert everything to SI units before you start, and write the unit next to every number in your working. To change km/h to m/s, divide by 3.6. Then look at the final answer and ask whether its size is believable.

WrongKE = ½ × 2 × 72² (72 in km/h)Right72 km/h = 20 m/s, KE = ½ × 2 × 20² = 400 J
17

Thinking heavier objects fall faster

What it looks likeA student predicts that a 2 kg ball dropped from a roof will land well before a 1 kg ball of the same size. They are surprised that, ignoring air resistance, the two land together.

Why it happensEveryday experience includes feathers and paper drifting down slowly, so it seems weight decides the speed. The real difference there is air resistance, which matters much more for light, spread-out objects. A heavier object does feel a bigger gravitational force, but it also has more mass to accelerate, so the acceleration is the same.

The fixWrite it out: weight is mg, so a = F/m = mg/m = g, and the mass cancels. Without air resistance, every object near the Earth's surface falls with an acceleration of about 9.8 m/s². An astronaut on Apollo 15 showed this on the Moon by dropping a hammer and a feather, which landed together.

Wrong2 kg ball falls twice as fast as 1 kg ballRightNo air resistance: both fall at 9.8 m/s²
18

Using a formula before drawing the diagram and choosing a direction

What it looks likeA student throws numbers into v = u + at without a sketch, adds g instead of subtracting it, and finds a ball thrown up at 15 m/s moving faster after 2 seconds. On a slope question, they write the normal force as mg instead of mg cos θ.

Why it happensPicking an equation feels like progress, so students skip the step that shows what is actually happening. Without a diagram, it is easy to miss a force, use the wrong component or lose track of which way is positive. Vectors such as velocity, acceleration and force all need a sign.

The fixStart every mechanics question with a sketch: for forces, a free body diagram with every force drawn as an arrow from the object. Mark which direction is positive, then give every vector a sign that matches it. Only then choose the equation.

Wrongv = 15 + 9.8 × 2 = 34.6 m/sRightUp is +: v = 15 + (-9.8)(2) = -4.6 m/s

Test yourself on today's physics question →

Study habits (every subject)

Study habits (every subject) mistakes

Some mistakes are not about any one topic. They are habits that quietly hold students back in coding, maths and physics alike. Fixing these often makes a bigger difference than any single lesson.

19

Copying a worked solution without understanding it

What it looks likeA student's homework matches the textbook example step for step, but when the numbers change in class they cannot start. In coding, it looks like pasted code from a tutorial that they cannot explain line by line.

Why it happensFollowing a solution feels like learning because every step makes sense as you read it. But recognising a method is much easier than producing it from a blank page. The gap only shows up in a test, when there is nothing to follow.

The fixAfter reading a worked example, close it and redo the problem from scratch. If you get stuck, look only at the next line, then close it again. For code, type it yourself rather than pasting, and change one thing to see what happens.

20

Letting AI do the homework

What it looks likeThe homework is neat, complete and correct, but the student cannot explain the method or repeat it without help. In coding, the program works but uses ideas the student has never been taught.

Why it happensAI tools give fast, confident answers, and finishing the task feels like the goal. But the point of homework is the thinking, not the finished page. Skipping the struggle means skipping the part where learning actually happens.

The fixUse AI like a tutor, not a ghostwriter: ask it to explain an idea, give a hint or check your own answer once you have one. Try every problem yourself first. A good test is whether you could explain your answer to someone else without the screen in front of you.

21

Watching and reading instead of practising

What it looks likeA student watches several videos on a topic and feels confident, then gets most of the practice questions wrong. Their notes are detailed but they have written very little code or worked very few problems.

Why it happensWatching an expert makes a skill look easy, and that feeling of understanding is convincing. Coding, maths and physics are skills, though, and skills are built by doing. Short, regular practice works much better than one long session the night before a test.

The fixFor every topic, do more questions than you read about: a few each day beats a long session once a week. Mix in older topics so they stay fresh. Keep a list of questions you got wrong and come back to them a few days later.

22

Not reading the question properly

What it looks likeA student gives the answer in cm when the question asked for metres, rounds to 2 decimal places instead of 3 significant figures, or returns a list when the task said to print the total. They knew the method but answered a different question.

Why it happensStudents start working as soon as they recognise the topic, so the last line of the question, where the details usually are, gets skipped. Coding tasks hide key words like "sorted" or "unique", and physics questions hide units and directions. Rushing feels faster but costs marks.

The fixRead the whole question twice before writing anything. Underline what is given, what is asked for and any instruction about units, rounding or format. At the end, read the question once more and check your answer matches exactly what it asked.

WrongAnswer: 3.456 (asked for 3 s.f.)RightAnswer: 3.46 (3 s.f.)
Learn it properly, live

Courses where these habits are taught

All courses →  ·  Physics courses (Circuits) →

Practise today

Daily challenges and guides

Good to know

Questions, answered

What is the most common mistake students make in maths?

Sign errors are the most common, especially when a minus sign sits in front of a bracket, as in 3 - 2(x - 4). Close behind are writing (a + b)² as a² + b² and cancelling terms that are added rather than multiplied. All three are caught quickly by putting a simple number into the original and the final expression to see if they match.

What mistakes do beginners make most often in Python?

The most frequent are off-by-one errors with range, confusing = with ==, forgetting that input() returns text, and writing a lot of code before running any of it. Beginners also tend to close error messages without reading them, even though the last line usually names the exact problem. Running small pieces often and reading every error from the bottom up fixes most of these.

Why do students get physics questions wrong when they know the formulas?

Usually because they pick a formula before understanding the situation. Without a diagram it is easy to miss a force, use the wrong sign for a direction or forget to convert units like km/h into m/s. Everyday intuition also misleads them, for example believing a moving object needs a force to keep it moving or that current is used up in a circuit.

How can I help my child stop making careless mistakes?

Ask them to explain their working to you out loud, because explaining slows them down and shows where the gaps are. Encourage them to check every answer by substituting it back or testing it with a simple case, and to read each question twice. Careless mistakes usually come from rushing, so building a short checking habit helps more than doing extra worksheets.

Should my child use AI tools for homework?

AI can be useful as a tutor: explaining an idea in a different way, giving a hint or checking an answer the student has already worked out. It becomes a problem when it writes the answer, because the student then skips the thinking that homework is meant to build. A simple rule is to try every problem first and only ask AI about the step where you got stuck.

How do Modern Age Coders teachers help students fix these mistakes?

In our live online classes for coding, maths and Circuits physics, teachers watch students work through problems in real time, so they can spot a mistake as it happens and ask the question that helps the student find it themselves. Students then practise until the correct habit becomes automatic. To see how it works, book a Priority Demo for a live class today or tomorrow, or join the free demo queue, which takes at least 2 months.

Want a teacher who explains the why?

A daily question builds the habit. Live classes build the understanding: a real mentor who asks how you are thinking, spots the exact step that slips, and takes you further in coding, maths or physics than practice alone.

Keep exploring Modern Age Coders

Related courses and guides

Learn more

From the blog

Start here

Ask Misti AI
Chat with us
Enroll Watch Class Priority Demo Enrol Book a Demo Watch Class WhatsApp Book demo today