+ 2
Please help? I'm very new at this and my issue is probably trivial but where am I going wrong?
4 Answers
+ 5
hi gareth, i saw your code and run it in regular IDE. So it runs with some limitations:
-after the first run, you can not finish with "quit"
ok, i did some amendments for you, in the hope you enjoy it and will learn from it.
- changed operator input and check with if
- for each of the four calculations that can be done, there is an input for two values - this is duplication of code
- the same is for outputting the result - this is duplication of code
this is a lot of code, that could be done in a much more readable way. only two inputs in total for values, and also only one print staement.
Here is your code:
https://code.sololearn.com/cYh8E2W0RV9O/?ref=app
+ 7
Your program seems to work okay, as long as you run it in an IDE which supports a live console (unlike SL). If you're on Android, you could try running it on Pydroid as it seems to work fine with that đ€·ââïž
+ 1
Lothar This a great. Thank you so much.
+ 1
Sololearnâs playground is kinda wack with Input, as the other đ
±ïžois said, run it in a IDE or you have terminal, enter, âsudo apt install vimâ and you will get the vim editor and you can save to a .py file and run it no problem! There is more detailed tutorials on YouTube