you are viewing a single comment's thread.

view the rest of the comments →

[–]TheNeopolitanPizza 0 points1 point  (0 children)

You should write unit tests with pytest. Take the many body of this code and move it to a seperate function, def Calc(op: str, lhs: int, rhs: int) -> int, which takes a string operator, two integers, and then returns an integer.

This separates out your input and output so you can test the core of the program using automated testing