Integer Numbers | SoloLearn: Learn to code for FREE!


Integer Numbers

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. Enter 7, 2, bob, 10, and 4 and match the output below.


6/4/2020 1:48:19 PM

Moye Nkem Onyeka

6 Answers

New Answer


Nwannem, check out my solution here. Type in your inputs separating them on different line using tab key. That's how the code playground works. Good luck.


Moye Nkem Onyeka try this, but it won't work on sololearn playground, unless you put every input on one line (and all inputs are integers) at a time and 'done' on the last line as final input. you can try it in pycharm. if the number is not integer (apart from float which will be transformed to integer without rounding up to the higher value) it will print the text 'please enter integer num' and you can continue with the inputs


Move the code link from thread title to the Description field. Links don't work if you put them in title or tags. And please specify a relevant language in the thread tags instead 👍


Ipang ? It now on description, please confirm this.


I can see it, ok good luck with solution 👍


I await solutions ooh