Question: WHILE LOOP AND NO INPUT FUNCTION Write a program the same as assign5-1. In the end, instead of average, print out the max and min

WHILE LOOP AND NO INPUT FUNCTION

  1. Write a program the same as assign5-1. In the end, instead of average, print out the max and min value of the numeric inputs. You are not allowed to use predefined python max and min functions.

    Input:

    a) python C:\assign5-2.py 10 3 -1 cat 2 3 0 test 1 done 1 2

    b) python C:\assign5-2.py cow dog 1 2 3 9 -2 done

    Output:

    a) total:18, count:7, max:10, min:-1

    b) total:13, count:5, max:9, min:-2

  2. Write a program the same as assign5-1. In the end, instead of average, print out the max and min value of the numeric inputs. You are not allowed to use predefined python max and min functions.

    Input:

    a) python C:\\assign5-2.py 10 3 -1 cat 2 3 0 test 1 done 1 2

    b) python C:\M5\assign5-2.py cow dog 1 2 3 9 -2 done

    Output:

    a) total:18, count:7, max:10, min:-1

    b) total:13, count:5, max:9, min:-2

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!