Skip to content

Instantly share code, notes, and snippets.

View abdoulayegk's full-sized avatar
🎯
Learning Data Science & machine learning

Abdoulaye Balde abdoulayegk

🎯
Learning Data Science & machine learning
View GitHub Profile
@abdoulayegk
abdoulayegk / Program52.py
Last active June 18, 2020 08:30 — forked from AmruthPillai/Program52.py
Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number.
"""
Working code
Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number.
"""
l = []
while True:
num = input("Enter a number:")
if num == 'done':
break