Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions

Question

=+j What rules will apply to the process of negotiations?

Answered: 1 week ago