From b7b1baad244756cbadf89d356d9b34e15f9afa5f Mon Sep 17 00:00:00 2001 From: Citrus716 <60357364+Citrus716@users.noreply.github.com> Date: Sat, 18 Jul 2020 14:09:13 -0400 Subject: [PATCH 1/2] Add files via upload --- 2_intermediate/chapter11/practice/number_mystery_1.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 2_intermediate/chapter11/practice/number_mystery_1.py diff --git a/2_intermediate/chapter11/practice/number_mystery_1.py b/2_intermediate/chapter11/practice/number_mystery_1.py new file mode 100644 index 00000000..b0a6a785 --- /dev/null +++ b/2_intermediate/chapter11/practice/number_mystery_1.py @@ -0,0 +1,6 @@ +# Write a function that takes in 3 integers. Get the sum of the 3 integers. Get +# the difference between the largest integer and the smallest integer. The +# function will return the product of these two integers you got. +# +# Use this function on 1,2,3 and print it. Use this function on 5,13,7 and +# print it From edc7c2879ec6ceb16aa8ead4fd0c995f2aa5feff Mon Sep 17 00:00:00 2001 From: Rebecca Dang Date: Sat, 18 Jul 2020 15:42:41 -0700 Subject: [PATCH 2/2] Copy instructions from num mystery 1 solution --- .../chapter11/practice/number_mystery_1.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/2_intermediate/chapter11/practice/number_mystery_1.py b/2_intermediate/chapter11/practice/number_mystery_1.py index b0a6a785..5b01f798 100644 --- a/2_intermediate/chapter11/practice/number_mystery_1.py +++ b/2_intermediate/chapter11/practice/number_mystery_1.py @@ -1,6 +1,12 @@ -# Write a function that takes in 3 integers. Get the sum of the 3 integers. Get -# the difference between the largest integer and the smallest integer. The -# function will return the product of these two integers you got. +# Number Mystery 1 +# Write a function called num_mystery that takes in 3 integers. +# The function should calculate the sum of the 3 integers and +# the difference between the largest integer and the smallest integer. +# The function should return the product of these two integers you calculated. # -# Use this function on 1,2,3 and print it. Use this function on 5,13,7 and -# print it +# Hint: You may find it useful to use the max() and min() functions. +# +# Use the num_mystery function on 1, 2, 3 and print the result. +# Use the num_mystery function on 5, 13, 7 and print the result. + +# write code here