subject
Computers and Technology, 28.07.2020 22:01 chy2313

With so much exciting programming on your mind, you want to solve everything with code. You decide to write a Python function to determine which is the middle number of three numbers. Write a function called find_middle to find the middle number of three numbers. Your function should take three arguments. Here is a template for you to copy and fill in: def find_middle(a, b, c): # your code here to return middle number # instead of just 0 return 0 Here are some example calls to your function: m = find_middle(4, 1, 2) print(m) Should print: 2 This example: m = find_middle(17.5, 17.5, 17.5) print(m) Should print: 17.5 This example: m = find_middle(0, 400, -400) print(m) Should print: 0 This example: m = find_middle(7, 3, -12) print(m) Should print: 3 Hint The auto-marker is expecting you to submit only your function definition. You should not include any calls to your function. Remember also that your find_middle function should return the result to the caller rather than print the result. this is my code def find_middle(a, b, c): if (a>=b and c =b and a =b and a =c): # check if a is the middle element return a # return aif a is middle else: return c # ptherwise return c print(find_middle(4, 1, 2)) print(find_middle(17.5, 17.5, 17.5)) print(find_middle(0, 400, -400)) print(find_middle(7, 3, -12))

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen tool
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Alex’s family members live in different parts of the world. they would like to discuss the wedding plans of one of their distant relatives. however, alex wants all the family members to talk to each other simultaneously so that they can make decisions quickly. which mode of internet communication should they use? a. blog b. email c. wiki d. message board e. instant messaging
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
Use the keyword strategy to remember the meaning of the following word. the meaning for the word has been provided. write your keyword and describe the picture you would create in your mind. obfuscate: to make something so confusing that it is difficult to understand.
Answers: 2
You know the right answer?
With so much exciting programming on your mind, you want to solve everything with code. You decide t...
Questions
question
English, 18.09.2020 04:01
question
History, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
English, 18.09.2020 04:01
question
Social Studies, 18.09.2020 04:01
question
Social Studies, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
History, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
question
Mathematics, 18.09.2020 04:01
Questions on the website: 13722362