On 07/18/2018 10:00 AM, Alan Gauld via Tutor wrote:
> On 18/07/18 14:46, Shall, Sydney wrote:
>
>> > is no need to put every class in a separate file, and it usually leads
>> > to complicated dependencies and circular imports.
>
>> I have constructed a program which has a parent class and a chi
On 18/07/18 17:00, Alan Gauld via Tutor wrote:
> Now the child class must import parent and dereference
> Parent within its module. (ie use parent.Parent)
>
> So two classes is more work for you and more work
> for the interpreter.
Oops, that should be two *files* is more work...
sorry,
--
Ala
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 f
On 18/07/18 14:46, Shall, Sydney wrote:
> > is no need to put every class in a separate file, and it usually leads
> > to complicated dependencies and circular imports.
> I have constructed a program which has a parent class and a child class
> and I have them in two different files. I import
Comments below.
On Wed, Jul 18, 2018 at 03:46:20PM +0200, Shall, Sydney wrote:
> On 24/05/2018 03:27, Steven D'Aprano wrote:
> > On Tue, May 22, 2018 at 03:46:50PM +0530, aishwarya selvaraj wrote:
> >> Dear all,
> >> I have created 2 classes in 2 separate files.
> >
> > If you have learned the
On 24/05/2018 03:27, Steven D'Aprano wrote:
> On Tue, May 22, 2018 at 03:46:50PM +0530, aishwarya selvaraj wrote:
>> Dear all,
>> I have created 2 classes in 2 separate files.
>
> If you have learned the bad habit from Java of putting every class in a
> separate file, you should unlearn that h
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 strin
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 like
10 matches
Mail list logo