r/PythonLearning • • Nov 09 '25

How can I improve?

Post image

I took Python at uni, but the topics were treated separately and we never got to put it all together, so I want to do small projects on my own to improve. Here's a little calculator I put together, critiques and tips are welcome. I'd like to practice some more, but idk what or where to start?

I hope this makes sense, English isn't my first language

163 Upvotes

60 comments sorted by

View all comments

10

u/MeLittleThing Nov 09 '25

Always check for user input.

What if:

> Enter a number: hello
> Enter another number: world

or

> Enter a number: 1
> Enter another number: 0
> Enter an operation: /

Also, there's a repeated pattern, and you can refactor a little your code by placing the print(result) after the if/elif/else (hint: result = "Input error")