[Tutor] Find the Greatest number out of 3 (Python 3.7.0)

Alan Gauld alan.gauld at yahoo.co.uk
Tue Oct 6 20:41:37 EDT 2020


On 07/10/2020 01:22, Chris Roy-Smith wrote:

>> So these are all strings: "423", "23", "43"
>>
> forgive me Alan,
> should the inputs be converted to numbers e.g.
> 
> number1=int(input('Number1: ')
> number2=int(input('Number2: ')
> number3=int(input('Number3: ')

Assuming you want to compare them as numbers then yes.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list