Re: [Tutor] Stuck on some basics re floats

2018-07-18 Thread Alan Gauld via Tutor
On 18/07/18 14:10, Matthew Polack wrote: > Thanks for the reply Alan. > > I found another fix where I could just use this: > > num1 =int(input('Ener inches here?: ')) > > > but a lot of people like yourself seem to be recommending this > 'float' method. It all depends whether your input is a

Re: [Tutor] Stuck on some basics re floats

2018-07-18 Thread Ben Finney
Matthew Polack writes: > I'm a teacher trying to learn Python with my students. Wonderful! Thank you for choosing Python for teaching your students. > I am trying to make a very simple 'unit calculator' program...but I get an > error ..I think python is treating my num1 variable as a text

Re: [Tutor] Stuck on some basics re floats

2018-07-18 Thread Peter Otten
Matthew Polack wrote: > Hi, > > I'm a teacher trying to learn Python with my students. > > I am trying to make a very simple 'unit calculator' program...but I get an > error ..I think python is treating my num1 variable as a text string...not > an integer. > > How do I fix this? > > Thanks! >

Re: [Tutor] Stuck on some basics re floats

2018-07-18 Thread Alan Gauld via Tutor
On 18/07/18 00:52, Matthew Polack wrote: > Hi, > > I'm a teacher trying to learn Python with my students. > > I am trying to make a very simple 'unit calculator' program...but I get an > error ..I think python is treating my num1 variable as a text string...not > an integer. You are correct. >

[Tutor] Stuck on some basics re floats

2018-07-18 Thread Matthew Polack
Hi, I'm a teacher trying to learn Python with my students. I am trying to make a very simple 'unit calculator' program...but I get an error ..I think python is treating my num1 variable as a text string...not an integer. How do I fix this? Thanks! - Matt print ("How many inches would you