Computers and Technology

Write a program in file MinMax. py that accepts an arbitrary number of integer inputs from the user and prints out the minimum and maximum of the numbers entered. The user will end the input loop by typing in the string 'stop'. When the user enters 'stop' your program should print out the minimum integer entered and the maximum integer entered. If the user enters 'stop' immediately (i. e., before any numbers are entered), you'll print a slightly different message. See the examples below: You can assume that the values entered are integers (positive, negative or zero) or the string 'stop' (lowercase). You don't have to validate the inputs. > python Min Max. py Enter an integer or 'stop' to end: stop You didn't enter any numbers > python Min Max. py
Enter an integer or 'stop' to end: -10
Enter an integer or 'stop' to end: 0 Enter an integer or 'stop' to end: +42
Enter an integer or 'stop' to end: 87 Enter an integer or 'stop' to end: -100
Enter an integer or 'stop' to end: stop The maximum is 87 The minimum is -100

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 20:20, ab847150
Wireless communications is likely to be viewed as an essential part of an enterprise network infrastructure when: select one: a. mobile communication is needed b. communication facilities must be installed at low initial cost c. communication must take place in a hostile or difficult terrain that makes wired communication difficult or impossible d. the same information must be broadcast to many locations
Answers: 1
image
Computers and Technology, 22.06.2019 06:30, iamquintix
Exchanging which type of data uses the least bandwidth? music photographs video voice bandwidth- the amount of data that can be moved between two points in a set time period
Answers: 1
image
Computers and Technology, 23.06.2019 08:30, mai1261
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
image
Computers and Technology, 23.06.2019 22:30, kayelynn003
How many points do i need before i can send a chat
Answers: 1
Do you know the correct answer?
Write a program in file MinMax. py that accepts an arbitrary number of integer inputs from the user...

Questions in other subjects:

Konu
Mathematics, 19.02.2021 16:40