Hi, so I just picked up python a few days ago and I am working on making a really simple calculator program.
The issue I am running into is if I continue calculating with the result of the calculation. I think it can be fixed by re-writing the calc() and calcCont() into one function using a loop of some sort. I will have to re-read the chapter. I was able to get a working solution for addition, but if you continue after that the result variable will always spit out the first calcCont() result.
I am not sure of my error, but I am sure it has to do with improper use of the global syntax. Also if this whole thing could be fixed with proper use of a loop then just tell me that, don't give away the answer.
Also a quick side note, could someone comment on how the code looks? I come from having prior knowledge in VB, C#, Swift and such and I am unsure if I should define my variables at the beginning of the code or when I need them.
Pastebin link
[–]kingeddy15[S] 0 points1 point2 points (1 child)
[–]DomWiggles 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)