>codeshame
Score: 2.5 out of 10
2.5/10
public roast
verdict: needs_serious_help
Python
6 lines
3 focus points

"A spectacular waste of CPU cycles. This developer has successfully invented a new way to do absolutely nothing, with extra steps."

Here is the breakdown of what hurt your score, plus a cleaned-up version you can use as a starting point. If the roast feels fair, share it. If it feels unfair, paste better code next time.

score

2.5 / 10

fixed output

2 lines

line delta

-4

// summary

Your strongest next move is to fix the highest-severity issue first, then compare the cleanup against the original before shipping anything.

// sharing

Public roasts can land in the leaderboard. Private reviews stay out of it and are better for real code you do not want exposed.

// compare

Use the original and fixed blocks below to spot naming, logic, and structure changes quickly instead of reading the whole thing twice.

//your_submission
ConfusedMath.py
def do_math(a, b):
    # This does math
    c = a + b
    c = c - b
    c = c + b
    return c
//detailed_analysis
!

Redundant Operations

Adding and subtracting the same number consecutively? Did a preschooler write this or are you trying to keep the CPU warm?
?

Useless Comments

'This does math' - no kidding, Sherlock. Next time, try writing code that explains itself instead of relying on captain obvious comments.
+

Variable Reassignment

Constantly redefining 'c' instead of just doing the math in one step. It's like unpacking and packing a suitcase every time you need fresh socks.
//suggested_fix

original: 6 lines · fixed: 2 lines

ConfusedMath_fixed.py
+def do_math(a, b):
+ return a + b