+ 1
Help me out with this calculator operator
Write a program to take two integers as input and output their sum. Sample Input: 2 8 Sample Output: 10
15 odpowiedzi
+ 6
Yinka Bello , the task you mentioned is the last exercise in the chapter "Strings and Variables. All you need to solve in this task is well explained in this chapter. So please go back, read the tutorial explanations. also use the samples marked with "TRY IT YOURSELF" to learn how it is working.
doing so, you will be able to solve the task you are asking here.
+ 3
Yinka Bello It's very simple. You just need to add both number.
+ 2
Which language?
+ 2
Yinka Bello
Explaination is given here.
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2271/
+ 2
Yinka Bello First search on google how to take integer input in python.
+ 1
Thanks all for your timely response
0
Write a program to take two integers as input and output their sum.
Sample Input:
2
8
Sample Output:
10
Please, help me out with this.
0
Please explain
0
Please, explain. I need more explanation on how to that
0
This is an example of how the code will look like....
a = int(input('your first number'))
b = int(input('your second number'))
print(a + b)
...
The int might be float
depending on what the instruction says...
I hope this helps...
0
This is a very basic program that u come across in almost all Programing languages 😀😀 ,
This is how ur code should look like in python
num1 = int(input("enter 1st number "))
num2 = int(input(" enter 2nd number: "))
def calc (num1, num2):
sum = num1 + num2
return sum
i belief using a function will help you follow the DRY principle and automate the calculations ,
Hope my solution help 😀😉
i post such help daily on my facebook page
https://mobile.facebook.com/DevLearnearn-102377388463597/?ref=opera_speed_dial
0
x = int(input())
y = int(input())
print(x+y)
0
#User input
#Assigning the number of variables
a = input()
b = input()
#Result
print(a + b)
- 1
- 2
Python language