Calculator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Calculator

How do you make a calculator on Python?

19th Mar 2020, 10:37 AM
Zori
Zori - avatar
5 Answers
+ 6
Your code looks very nice 👍👍👍
19th Mar 2020, 5:16 PM
Lothar
Lothar - avatar
+ 3
There are countless samples of calculators here in this place, so please use the search bar.
19th Mar 2020, 10:48 AM
Lothar
Lothar - avatar
19th Mar 2020, 4:48 PM
ANJALI SAHU
0
Zori A simple method is using the eval function which u can use to make a calculator within two lines. a = input() print(eval(a)) If someone inputs a string like 2 * 3 + 4, EVAL will consider them as numbers. Otherwise you can use IF ELSE to manually make a calculator.
19th Mar 2020, 12:26 PM
maf
maf - avatar