Looking for trustworthy answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Our Q&A platform offers a seamless experience for finding reliable answers from experts in various disciplines. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.

Input a list of positive numbers, terminated by 0, into an array Numbers[]. Then display the array and the largest and smallest number in it.

Sagot :

Answer:

hope this helps and mark my ans brainliest if it helped.

Explanation:

def main():

Numbers = []

n = input("Enter the number: ")

while n != 0:

Numbers.append(n)

n = input("Enter the number: ")

if len(Numbers) > 0:

max = Numbers[0]

min = Numbers[0]

for i in range(0, len(Numbers)):

if max < Numbers[i]:

max = Numbers[i]

if min > Numbers[i]:

min = Numbers[i]

print Numbers

print "Largest: ", max

print "Smallest: ",min

  

main();