Re: [Tutor] (no subject)

2017-08-16 Thread Alan Gauld via Tutor
On 16/08/17 23:36, Howard Lawrence wrote: > class Address: > def _init_(self,Hs,St,Town,Zip): > self.HsNunber=Hs > self.Street=St > self.Town=Town > self.Zip=Zip > Addr=Address (7, ' high st', 'anytown',

Re: [Tutor] Object takes no parameters

2017-08-16 Thread Alan Gauld via Tutor
On 17/08/17 01:08, Howard Lawrence wrote: > class Human: > def _init_(self, n, o) > self.name = n > self.occupation = o > > > tom = Human('tom cruise', 'actor') > > Traceback most recent call last > File "c:\users\shaun\python\python35\human_class.py"line 16 in module >

Re: [Tutor] (no subject)

2017-08-16 Thread Zachary Ware
Hi Howard, On Wed, Aug 16, 2017 at 5:36 PM, Howard Lawrence <1019sh...@gmail.com> wrote: > class Address: > def _init_(self,Hs,St,Town,Zip): Your issue is in this line, it should be `__init__` rather than `_init_` (that is, two underscores before and after "init"). Hope this helps, -- Z

[Tutor] Object takes no parameters

2017-08-16 Thread Howard Lawrence
class Human: def _init_(self, n, o) self.name = n self.occupation = o def do_work(self): if self.occupation== 'tennis player': print(self.name, 'plays tennis') elif self.occupation == 'actor': print(self.name, 'shoots film')

[Tutor] (no subject)

2017-08-16 Thread Howard Lawrence
class Address: def _init_(self,Hs,St,Town,Zip): self.HsNunber=Hs self.Street=St self.Town=Town self.Zip=Zip Addr=Address (7, ' high st', 'anytown', ' 123 456') Traceback (most recent call last): File "

Re: [Tutor] pygame not working

2017-08-16 Thread Steven D'Aprano
Hi Quantz Jeremy, or Ethan, which do you prefer? On Wed, Aug 16, 2017 at 10:33:05AM -0600, Quantz Jeremy wrote: > I already tried stack overflow, and that didn’t work. What did you ask, and what answers did they give that didn't work? Or is it a secret? :-) -- Steve

Re: [Tutor] "Path tree"

2017-08-16 Thread Cameron Simpson
On 16Aug2017 10:22, Alan Gauld wrote: On 16/08/17 02:02, Cameron Simpson wrote: Ok. So you have a graph like this: 1 -- 2 -- 3 -- 4 | 7 -- 5 -- 6 -- 8 graph = { 1: [2], 2: [1, 3], 2: [1, 3, 5], 3: [2, 4], 4: [3], 5: [7, 6], 5: [2, 6, 7],

Re: [Tutor] pygame not working

2017-08-16 Thread boB Stepp
On Wed, Aug 16, 2017 at 11:33 AM, Quantz Jeremy wrote: > I’m not sure if I should be asking here about this, but on my Mac computer, > Pygame keeps crashing on me. I have Python 2.7.13 (I can’t use Python 3 > because I’m learning from and online course and he’s using Python 2.7.13. > Unless you

Re: [Tutor] pygame not working

2017-08-16 Thread Alan Gauld via Tutor
On 16/08/17 17:33, Quantz Jeremy wrote: > I’m not sure if I should be asking here about this, Strictly speaking no, this list is for questions about Python and its standard library. So PyGame issues should really go to the PyGame support fora, and that's still the best place for detailed support.

[Tutor] pygame not working

2017-08-16 Thread Quantz Jeremy
I’m not sure if I should be asking here about this, but on my Mac computer, Pygame keeps crashing on me. I have Python 2.7.13 (I can’t use Python 3 because I’m learning from and online course and he’s using Python 2.7.13. Unless you can give me a list or something for all the differences, I am c

Re: [Tutor] "Path tree"

2017-08-16 Thread Alan Gauld via Tutor
On 16/08/17 02:02, Cameron Simpson wrote: > Ok. So you have a graph like this: > 1 -- 2 -- 3 -- 4 >| > 7 -- 5 -- 6 -- 8 > > graph = { > 1: [2], > 2: [1, 3], 2: [1, 3, 5], > 3: [2, 4], > 4: [3], > 5: [7, 6], 5: [2, 6, 7], > 6: [5, 8], > 7:

Re: [Tutor] Long post: Request comments on starting code and test code on chess rating project.

2017-08-16 Thread Alan Gauld via Tutor
On 16/08/17 04:06, boB Stepp wrote: >> I agree with Neil, this is exactly what SQL is good for and >> would make this part of the project much easier and would have >> the added benefit of introducing you to one of the trickiest, >> but most common, bits of OOP - object persistence... > > Would y