Question: Please help me with this question. The answer is given below. However, I do not understand the answer. Please explain the code step by step.
Please help me with this question.
The answer is given below.
However, I do not understand the answer.
Please explain the code step by step.
For example, I do not understand the part 'if a>maximum:'.
Because I can see a>maximum and a=maximum together so I am not sure how this works.
The question is
Write a Python program that reads a positive integer user input value n and then reads n user input float values and finally prints both the minimum and maximum among the n user input float values.
The answer is
n=int(input('Enter a positive integer for n:')) a=float(input('Enter n values :')) maximum=a minimum=a for i in range(n-1): a=float(input('Enter n values :')) if a>maximum: maximum=a if a There are 3 Steps involved in it Get step-by-step solutions from verified subject matter expertsStep by Step Solution
