Python Calculator
- 1 Devlogs
- 0 Total hours
making a calc in python for a sticker!
making a calc in python for a sticker!
built a terminal calculator in python today. nothing really big. i did this for the sticker

the main thing i wanted was a clean menu system so i used a numbered list and sys.exit() to handle the exit case gracefully. sys.exit() was the cool thing i found that makes the code exit without all these error messages in the terminal. additionally, also added input validation so if you pick a choice outside 1-5 it tells you instead of just crashing.
one fun thing: added ascii art at the start and end using multiline print statements. the banner at the top took a while to get right because the spacing kept breaking.
also handled division by zero explicitly since thats a pretty common edge case that trips people up.
next steps: maybe add a loop so you can do multiple calculations without rerunning the script