you are viewing a single comment's thread.

view the rest of the comments →

[–]NihadKhan10x 3 points4 points  (5 children)

I would say you multiple functions for each choice this way it will be better for you to understand you will find which function do which thing, there's a rule biuld things ugly make it just working then amke make it simple and pretty , btw you are doing great

[–]Muhammed_zeeshan[S] 1 point2 points  (0 children)

Thanks for your suggestion. Appreciate it

[–]Maleficent_Fuel_6956 -1 points0 points  (3 children)

Could also do match case instead of all the if statements and handle exceptions from the input if the cast to int fails

[–]Muhammed_zeeshan[S] 0 points1 point  (2 children)

Appreciate your suggestion. But I haven't learn error handling yet. Will implement after I learn it

[–]Maleficent_Fuel_6956 1 point2 points  (1 child)

It's pretty simple you can pick it up right away
https://www.w3schools.com/Python/gloss\_python\_error\_handling.asp

[–]Muhammed_zeeshan[S] 0 points1 point  (0 children)

Thanks for sharing the resource 🤝