x="123"y="456"z="789"q=x+y+zprint(q)-Snithik Kollipara
If you define variable as string, when you use arithmetic operator +, you see answer 123456789. If you are solving sum of x,y,z problem, define the variable as int (without the quotes)
a = int(input(“number a=“))b = int(input(“number b=“))c = a + bPrint(c)
x="123"
ReplyDeletey="456"
z="789"
q=x+y+z
print(q)
-Snithik Kollipara
If you define variable as string, when you use arithmetic operator +, you see answer 123456789. If you are solving sum of x,y,z problem, define the variable as int (without the quotes)
Deletea = int(input(“number a=“))
ReplyDeleteb = int(input(“number b=“))
c = a + b
Print(c)