Question: PYTHON ONLY! PLEASE FOLLOW THE FORMAT/DIRECTIONS GIVING ONLY! SO I CAN LEARN. Write a program min_max.py that reads in floats (as many as the user

PYTHON ONLY! PLEASE FOLLOW THE FORMAT/DIRECTIONS GIVING ONLY! SO I CAN LEARN.PYTHON ONLY! PLEASE FOLLOW THE FORMAT/DIRECTIONS GIVING ONLY! SO I CAN LEARN.

Write a program min_max.py that reads in floats (as many as the user enters) from standard input and writes out the minimum and maximum values along with their ranks, i.e., their positions (starting at 1) in the input. # min_max.py: reads in floats (as many as the user enters) from standard # input and writes out the minimum and maximum values along with their ranks, # ie, their positions (starting at 1) in the input. import studio # Smallest and largest floats. NEG_INFINITY = float(middot -inf1) POS_INFINITY = float('inf') # Read floats from standard input into a list a. a =. .. # Define variables to keep track of the mininum value and its rank and # the maximum value and its rank. min_val = ... min_rank = ... max_val = ... max_rank = ... # Iterate the list a to identify the minimum value and its rank and the # maximum value and its rank, for i, v in enumerate(a): # Write the results (min_val, min_rank, max_val, max_rank)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!