Write function called evaluate() that evaluates the following Python expressions or assignments as specified: Request input from the user for three
View the step-by-step solution to:

Question

# Write function called evaluate() that evaluates the following Python expressions or

assignments as specified:

1. Request input from the user for three variables (floating-point or integer) x, y, z, and myAverage.
2. If the average of the first three numbers equals the fourth number, print 'Your average is correct.'. If not print 'Your average is not correct'. and print the correct average.
3. Print the largest value among x, y, and z.
4. Print the minimum value of x, y, y.

>>> evaluate()

Enter a number for x: 3

Enter a number for y: 3

Enter a number for z: 4.5

You have entered x = 3 , y = 3 , z = 4.5

Enter what you think the average of x, y, and z is: 3.5

The maximum value of x, y, and z = 4.5

The min value of x, y, and z = 3

>>> evaluate()

Enter a number for x: 3

Enter a number for y: 3

Enter a number for z: 4

You have entered x = 3 , y = 3 , z = 4

Enter what you think the average of x, y, and z is: 4.5

The correct average is: 3.3333333333333335

The maximum value of x, y, and z = 4

The min value of x, y, and z = 3

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents