[Tutor] calling function

2017-11-27 Thread Howard Lawrence
import turtle # this part draws a square def square(): my_turtle = turtle.Turtle() my_turtle.forward(100) my_turtle.left(90) my_turtle.forward(100) my_turtle.left(90) my_turtle.forward(100) my_turtle.left(90) my_turtle.forward(100) square() my_turtle.forward(100)

Re: [Tutor] (no subject)

2017-08-17 Thread Howard Lawrence
Yes, it does. On Aug 16, 2017 8:02 PM, "Zachary Ware" wrote: 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

Re: [Tutor] Tutor Digest, Vol 162, Issue 42

2017-08-17 Thread Howard Lawrence
tutor-requ...@python.org You can reach the person managing the list at tutor-ow...@python.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Tutor digest..." Today's Topics: 1. Object takes no parameters (Howard Lawrence) 2. Re: (

[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] Tutor Digest, Vol 162, Issue 19

2017-08-06 Thread Howard Lawrence
--- Forwarded message -- From: Cameron Simpson To: tutor@python.org Cc: Bcc: Date: Sun, 6 Aug 2017 17:40:02 +1000 Subject: Re: [Tutor] unorderable types On 06Aug2017 07:19, Alan Gauld wrote: > On 05/08/17 19:28, Howard Lawrence wrote: > >> if guess_value != number: >>

Re: [Tutor] unorderable types

2017-08-05 Thread Howard Lawrence
# this is a guess number game. import random guessesTaken = 0 print('hello! What is your name?') myName = input() number = random.randint(1, 20) print('Well, ' + myName + ', i am thinking of a number between 1 and 20') while guessesTaken < 6: print('take a guess.') guess = input() g

Re: [Tutor] unorderable types

2017-08-05 Thread Howard Lawrence
Typing the : print("type (guess_value)=", type (guess_value)) print("type (number)=",type(number) type (guess_value)= type (number)= == the code runs again then prints type guess_value =< class int> type number= = Now Traceback kicks in i

Re: [Tutor] (regarding unorderable types

2017-08-04 Thread Howard Lawrence
;help", perhaps something like "I don't understand this TypeError message"). Anyway, to your question: On 03Aug2017 13:27, Howard Lawrence <1019sh...@gmail.com> wrote: > hi ! i am newbie to coding love it but need help with problems which i > searched but poor results

[Tutor] (no subject)

2017-08-03 Thread Howard Lawrence
hi ! i am newbie to coding love it but need help with problems which i searched but poor results this is the error: typeError unorderable types: int()https://mail.python.org/mailman/listinfo/tutor