+ 1

If you input 4 * 5 can you take that input and run it as a operation? [Python 3]

a = input(ā€˜Calculator: ā€˜) a = int(a) print(a) Sorry Iā€™m not a professional. I learn Python as a new skill so that I donā€™t waste my holidays. And Iā€™m 12...

4th Dec 2019, 1:58 PM
Adriel Low
Adriel Low - avatar
1 Answer
+ 1
no it will not work, because int(a) expect an int and * is not a number. use a function instead like def mult(x, y) : return x * y get two inputs a and b a = mult(a, b)
4th Dec 2019, 2:09 PM
Bahhaāµ£
Bahhaāµ£ - avatar