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',
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
>
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
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')
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 "
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
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],
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
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.
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
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:
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
12 matches
Mail list logo