- 4
Write a program to take two integers as input and output their sum. Sample Input: 2 8 Sample Output: 10
I cant get past this I'm confused pls help It keeps saying the output will be 9 Even tho i use 6 and 3 The above one is just an e.g
53 Antworten
+ 30
x=input()
y=input()
z=int(x)+int(y)
print(z)
After many attempt this is the answer for this question
+ 9
Num1=int(input("enter first number:"))
Num2=int(input ("enter second number:"))
Sum=Num1+Num2
print ("your sum =",Sum)
I hope you like it...:)
Thank you guys..urs
Pavan
👆👆👆👆
+ 5
okay
a=int(input ())
b=int(input())
c=a+b
Print (c)
+ 5
# try this code of mine
x = int(input())
y = int(input())
z = int(x + y)
print(z)
+ 4
The attempt of :
x=int(input(first number))
y=int(input(second number))
z= x+y
print(z)
doesn‘t deliver the correct solution. Because input is resulting in a string number. Therefor the result is always going to be : xy
e.g. x= int(input(6))
y= int(input(3))
z= x+y
print(z)
Result: 63 and not 9, which is wanted.
So I would try it with the following:
x= 6
x+= 3
print(x)
which will result in the correct solution, which is 9.
+ 4
Num1=int(input())
Num2=int(input ())
Sum=Num1+Num2
print (Sum)
+ 3
a=int(input())
b=int(input())
sum=a+b
print(sum)
+ 3
this correct's
n1 = int(input())
n2 = int(input())
sum = n1+n2
print(sum)
+ 3
none of it was right
+ 2
a=int(input())
b=int(input())
z=a+b
print(z)
Вай парни вы конечно тупите) и для виду фиговинок понаставлю ЭТ ТОЧНО РАБОТАЕТ ПРОВЕРЯЛ!ю.............................................
+ 2
the correct answer is
x=int(input())
y=int(input())
z=x+y
print(z)
+ 2
x=int(input())
y=int(input())
print(x+y)
make sure to use this it works
+ 2
# your code goes here
a = int(input())
b = int(input())
c = a + b
print(c)
Try and learn
+ 1
What have you tried?
it's really a basic question that you can even Google and will give you an idea about how to solve it or maybe the solution to it ,
+ 1
I have attempted it abhay i still cant figure it out
+ 1
I've solved it thank you all
The mistake I was making was putting in the value i should have just left it blank
+ 1
n1 = int(input())
n2 = int(input())
sum = n1+n2
print(sum)
+ 1
Solution of your question:
# take a variable and use input function and also use type casting(convert str data type in int)
num_one = int(input("Enter Your First Number: ))
num1_two = int(input("Enter Your Seconed Number: ))
sum_of_nums = num_one + num1_two
print(sum_of_nums)
+ 1
Num1=int(input("enter first number:"))
Num2=int(input ("enter second number:"))
Sum=Num1+Num2
print ("your sum =",Sum)
I hope you like it...:)
Thank you guys..urs
Pavan
+ 1
x=input()
y=input()
z=int(x)+int(y)
print (z)