Skip to content

Commit fa1bd20

Browse files
authored
Added
1 parent 4300b16 commit fa1bd20

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Write a function that takes in 3 integers. Get the sum of the 3 integers. Get
2+
# the difference between the largest integer and the smallest integer. The
3+
# function will return the product of these two integers you got.
4+
#
5+
# Use this function on 1,2,3 and print it. Use this function on 5,13,7 and
6+
# print it
7+
8+
def num_mystery(first_int, second_int, third_int):
9+
sum_of_three = first_int + second_int + third_int
10+
largest = max(first_int, second_int, third_int)
11+
smallest = min(first_int, second_int, third_int)
12+
diff_ls = largest - smallest
13+
14+
return sum_of_three * diff_ls
15+
16+
print(num_mystery(1,2,3))#should print 12
17+
print(num_mystery(5,13,7))#should print 200
18+
19+

0 commit comments

Comments
 (0)