Computer Science, asked by leleann, 4 months ago

write a python program to add any three numbers using the variables​

Answers

Answered by tarunisri192
1

Answer:

Sum of three numbers in python

Pictorial Presentation: Sample Solution:- Python Code: def sum(x, y, z): if x == y or y == z or x==z: sum = 0 else: sum = x + y + z return sum print(sum(2, 1, 2)) print(sum(3, 2, 2)) print(sum(2, 2, 2)) print(sum(1, 2, 3)) Sample Output: Python: Sum of three given integers.

Explanation:

follow me

Answered by atrs7391
0

a = int(input("Enter first number: "))

b = int(input("Enter second number: "))

c = int(input("Enter third number: "))

sum = a + b + c

print("Sum of the numbers =", sum)

Similar questions