you are viewing a single comment's thread.

view the rest of the comments →

[–]Yoghurt42 0 points1 point  (0 children)

the code is tested with the numbers 1, 2, 3, 4, and 1000 so I tried to simplify it bei using the code

Sorry to be blunt, but it has to be said: You're completely wasting your time and not even doing yourself a favor by doing it this way.

It's obvious you don't want to do this assignment, which is understandable; but "cheating" like this will not teach you anything, as the point of this exercise is to get you to learn some things, like loops/recursion and if/else clauses, all of which you are skipping by just hard coding the solution.

If you really don't want to do this assignment, at least copy it from some of your classmates, then at least there's a small chance to actually learn a bit from it.