0
Print("2"+"2") is 2+2. But where to use these type syntax in python
4 Answers
+ 3
The output of Print("2"+"2") is 22.
you can use this when you need to type the input from user as numbers and to print the eqution like :
Print("2"+"2"+"="+str(2+2)) #the out put will be 2 + 2 = 4
try the following code:
x = eval(input(Enter 1st number))
y = eval(input(Enter 2nd number))
print (str(x) + " + " + str(y) + " = " + str(x+y))
+ 2
Assume your input for x = 2 and for y = 3 the output will be..
2 + 3 = 5
0
Output of this is
0
4