- 2
How to complete the "simple calculator" in strings and variables in python 3?
3 Answers
0
You just need to add the two inputs. input() returns a string that you have to convert with int()
0
1. You will need to setup your inputs to show num1, num2 & your operator, (+,Ă·,/,Ă,**,%) etc
2. Turn your num inputs into integers
3. Design your program to recognise the operator, then operate upon the 2 integers to get your result.
4. A lot of people use if, elif, else arguments to achieve this but there are other methods including functions and dictionaries.
Start simple and build from your successes, IE: Try to create 1 operation only, (5+6) = ?
If you can do one, you can do them all.
Good luck
0
Thanks