Question: Design a python program with a loop that lets the user enter a series of numbers. The user should enter - 99 to signal the

Design a "python" program with a loop that lets the user enter a series of numbers. The user should enter - 99 to signal the end of the series. After all the numbers have been enter been entered, the program should display the largest and smallest numbers entered.

this is what i have so far

def main(): numbers = [] while True: user_input = int(raw_input("Enter a number")) if user_input == -99: break else: numbers.append(user_input) print('Largest is {}, smallest is {}'.format(max(numbers), min(numbers)))

def largest(number): largest = 0 if number > largest: largest = number return largest

def smallest(number): smallest = 10000 if number < smallest: smallest = number return smallest

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!