write a program in python to input three numbers and print their sum
Answers
Answered by
27
Explanation:
number1 = int(input('Enter the first number:'))
number2 = int(input('Enter the second number:'))
number3 = int(input('Enter the third number:'))
print('The total of the three numbersis:',number1+number2+number3)
Answered by
6
★
num1 = int(input()) # Line 1
num2 = int(input()) # Line 2
num3 = int(input()) # Line 3
print(num1 + num2 + num3) # Line 4
★
✦ Line 1: This line prompts user to enter an integer and store it in a variable called num1.
✦ Line 2: This line prompts user to enter another integer and store it in a variable called num2.
✦ Line 3: This line prompts user to enter third integer and store it in a variable called num3.
✦ Line 4: This line prints the sum using the print() function.
Similar questions
Social Sciences,
3 months ago
English,
3 months ago
Physics,
7 months ago
Social Sciences,
7 months ago
Science,
11 months ago
Physics,
11 months ago