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
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
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!
>
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.
>
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