7.3 code practice edhesive
Answers
Answer:
The following is the correct desired answer :
def print sum(a,b,c):
29
print(a+b+c)
one = int(input("Enter the 1st number: "))
two = int(input("Enter the 2nd number: ")
three = int(input("Enter the 3rd number: ")
print sum(one,two,three)
Explanation :
To gain the answer we just have to use the following simple python format that we already know :
x = input("Type a number: ")
y = input("Type another number: ")
sum = int(x) + int(y)
print("The sum is: ", sum)
- The iterable's components are added together and the sum is returned by the sum() function.
- Iterative - Iterative (list, tuple, dict, etc). The iterable's items must be numbers.
- Start, which is optional, is added to the iterable's item total. start has a default value of 0. (if omitted)
#SPJ3
Answer:
To gain the answer we just have to use the following simple python format that we already know :
x = input("Type a number: ")
y = input("Type another number: ")
sum = int(x) + int(y)
print("The sum is: ", sum)
The iterable's components are added together and the sum is returned by the sum() function.
Iterative - Iterative (list, tuple, dict, etc). The iterable's items must be numbers.
Start, which is optional, is added to the iterable's item total. start has a default value of 0. (if omitted)
Explanation:
The following is the correct desired answer :
def print sum(a,b,c):
29
print(a+b+c)
one = int(input("Enter the 1st number: "))
two = int(input("Enter the 2nd number: ")
three = int(input("Enter the 3rd number: ")
print sum(one,two,three)
To gain the answer we just have to use the following simple python format that we already know :
x = input("Type a number: ")
y = input("Type another number: ")
sum = int(x) + int(y)
print("The sum is: ", sum)
The iterable's components are added together and the sum is returned by the sum() function.
Iterative - Iterative (list, tuple, dict, etc). The iterable's items must be numbers.
Start, which is optional, is added to the iterable's item total. start has a default value of 0. (if omitted)
#SPJ2