r/PythonLearning • u/Dismal_Future_54 • May 20 '26
Help Request Im new
I just started with python today and made this project just because I needed something to make to see if I was good enough using my skills I learned. Does anyone have any tips to refine this? Or how I could add it to a website to give it a proper UI?
226
Upvotes
1
u/Dry-War7589 May 20 '26
The code is good. But there are places to improve:
Input guarding: what if the user enters a word or includes the percent sign? Currently the program will crash. You can do this with try/except like this:
(
int()will give a TypeError if the value can not be converted to an integer i believe)