Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON ONLY Lab 6 b: For this lab, you will need to write two different files; one called MyMath.py , and one called Lab 6

PYTHON ONLY
Lab6b: For this lab, you will need to write two different files; one called
MyMath.py, and one called
Lab6B.py.
Inside of
MyMath.py, write the following three methods:
my_max(num_one, num_two): returns the largest between the two inputs
my_min(num_one, num_two): returns the smallest between the two inputs
my_avg(num_one, num_two): returns the mean average of the two inputs
Inside
Lab6B.py, import
MyMath.py. After that, prompt the user for two numbers, and then pass both numbers as arguments to each of MyMath's methods, making sure to print out the result as in the sample output below (user input in bold).
Note: You can assume that the user will only ever enter numbers when prompted.
Sample output #1:
Enter number 1: 4
Enter number 2:9
Min is 4
Max is 9
Average is 6.5
Sample output #2:
Enter number 1: 45
Enter number 2: 11
Min is 11
Max is 45
Average is 28.0
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions