New course! Every coder should learn Generative AI!
Try a free lesson0
How do you add an on Python 3
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
+ 1
But how do I make simple calculator with inputs?
0
print(4+5) ?
0
Simply
add two or more number in the normal mathematics way and other calculation
example
print (2+2)
#output is 4