Menu

[solved]-Write Python Program Repeatedly Asks User Input Pair Integers Program Record Largest Numbe Q39090204

Write a python program that repeatedly asks the user to input apair of integers. The program should record the largest number ofeach pair into a list. The program should keep asking the user toinput pairs of numbers until the user enters -1 for the firstnumber. At this point the program should print the list on a singleline, with each value separated by a space and then stop.

Example of expected behaviour:

Please enter first number: 7

Please enter second number: 3

[ 7 has been stored ]

Please enter first number: 5

Please enter second number: 34

[ 34 has been stored ]

Please enter first number: 16

Please enter second number: 22

[ 22 has been stored ]

Please enter first number: -1

Please enter second number: 3

[ -1 entered: storage ends ]

The stored list is { 7 34 22 }

Expert Answer


Answer to Write a python program that repeatedly asks the user to input a pair of integers. The program should record the largest … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *