How do you add an on Python 3 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do you add an on Python 3

8th Oct 2020, 9:30 PM
Harold Udensi
Harold Udensi - avatar
4 Answers
+ 4
addition(add) in Python works like this: print(1 + 1) « Print » prints text or operators (math) between the brackets() in the console. 1 + 1 is basically the way you learned it in math you can also substract(minus): print(1 - 1) multiplication(times) print(2 * 2) division: print(2 / 2) you can also declare variables with operators in python: examplevariable = 2+2
8th Oct 2020, 9:47 PM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar
+ 1
But how do I make simple calculator with inputs?
26th Oct 2020, 11:58 PM
Harold Udensi
Harold Udensi - avatar
0
print(4+5) ?
8th Oct 2020, 9:33 PM
Abhay
Abhay - avatar
0
Simply add two or more number in the normal mathematics way and other calculation example print (2+2) #output is 4
8th Oct 2020, 9:54 PM
Tim Don👨🏾‍💻🤟
Tim Don👨🏾‍💻🤟 - avatar