Answered step by step
Verified Expert Solution
Question
1 Approved Answer
LAB: Max and min numbers (Python) Write a program whose inputs are three integers, and whose outputs are the largest of the three values and
LAB: Max and min numbers (Python)
Write a program whose inputs are three integers, and whose outputs are the largest of the three values and the smallest of the three values.
Ex: If the input is:
7 15 3
the output is:
largest: 15 smallest: 3 Your program must define and call the following two functions. The function largest_number() should return the largest number of the three input values. The function smallest_number() should return the smallest number of the three input values.
largest_number(num1, num2, num3) smallest_number(num1, num2, num3)
Note: DO NOT use max() and min().
(must use default template)
def largest_number(num1, num2, num3): # Type your code here. def smallest_number(num1, num2, num3): # Type your code here. if __name__ == '__main__': # Type your code here.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started