Re: [Tutor] Books

2006-05-03 Thread Hoffmann
iate available. I am studying Python by myself with this book, and I am enjoying it a lot. I hope this help. Hoffmann __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _

Re: [Tutor] Is this correct?

2006-04-15 Thread Hoffmann
se seems to want an object and implies a class > should be used. > > > def printTime(time): > > print 'The time is %dh:%dmin:%dsec' % (hour, min, > > sec) > > > > printTime(time) > > HTH, > > Alan G > Author of the learn to program

[Tutor] Is this correct?

2006-04-15 Thread Hoffmann
= min time.seconds = sec def printTime(time): print 'The time is %dh:%dmin:%dsec' % (hour, min, sec) printTime(time) That seems to work, but I would like to hear from you. Please, let me know if I am in the right way. Thanks! Hoffmann _

Re: [Tutor] failing to learn python

2006-04-13 Thread Hoffmann
Even at home I use linux 90% of the time. However, in some cases I use Windows, as well (to watch DVDs (movies), for example). Due to the stability of Windows in this (multimidia) case, I do prefer using it for watching movies. So. There is no reason to use just one programming

[Tutor] Python video?

2006-04-12 Thread Hoffmann
Hi, I read this week on this forum about a kind of Python video in its website. Which view is that, and where could I find it? I search in Python website, but I didn't find it. Is it a 'demo' of the language? Thanks, Hoffmann

Re: [Tutor] Question about list

2006-04-10 Thread Hoffmann
lement of the list, but won't > for the first and > second elements. One way to solve this problem is > to use the type() > function to figure out if your item is a string or > list and use len() > as appropriate. I hope this provides enough of a > hint. > >

Re: [Tutor] Question about list

2006-04-10 Thread Hoffmann
--- Terry Carroll <[EMAIL PROTECTED]> wrote: > On Mon, 10 Apr 2006, Hoffmann wrote: > > > Hello, > > > > I have a list: list1 = [ 'spam!', 2, ['Ted', > 'Rock'] > > ] > > and I wrote the script below: > > >

Re: [Tutor] Question about list

2006-04-10 Thread Hoffmann
--- John Fouhy <[EMAIL PROTECTED]> wrote: > Hi Hoffmann, > > On 11/04/06, Hoffmann <[EMAIL PROTECTED]> wrote: > > I have a list: list1 = [ 'spam!', 2, ['Ted', > 'Rock'] ] > > and I wrote the script below: > > > > i

Re: [Tutor] Question about list

2006-04-10 Thread Hoffmann
--- Adam <[EMAIL PROTECTED]> wrote: > On 10/04/06, Hoffmann <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I have a list: list1 = [ 'spam!', 2, ['Ted', > 'Rock'] > > ] > > and I wrote the script below: > > > &

[Tutor] Question about list

2006-04-10 Thread Hoffmann
27;Ted', 'Rock'] I also would like to print the length of each element of that list: spam! = 1 element 2 = 1 element ['Ted', 'Rock'] = 2 elements Could anyone, please, give me some hints? Thanks, Hoffmann __ Do Yo

Re: [Tutor] Program for outputing the letter backward

2006-03-30 Thread Hoffmann
--- Ed Singleton <[EMAIL PROTECTED]> wrote: > On 29/03/06, Hoffmann <[EMAIL PROTECTED]> wrote: > > --- John Fouhy <[EMAIL PROTECTED]> wrote: > > > > > On 29/03/06, Hoffmann <[EMAIL PROTECTED]> > wrote: > > > > vehicle='car&#x

Re: [Tutor] Program for outputing the letter backward

2006-03-29 Thread Hoffmann
--- Kent Johnson <[EMAIL PROTECTED]> wrote: > Hoffmann wrote: > > We are almost there. I changed the code and, at > least, > > I got the correct output. However, I also got a > > traceback. I didn't understand the traceback. > Could > > you clarify th

Re: [Tutor] Program for outputing the letter backward - almost there!

2006-03-29 Thread Hoffmann
Adam, Defenitely your second alternative is really great! Regarding that my 'bad' alternative, do you have any suggestion about that traceback? I not only would like to have the exercise done. And after your nice suggestion, I ALREADY have it, but also I would like to learn about th

Re: [Tutor] Program for outputing the letter backward - almost there!

2006-03-29 Thread Hoffmann
--- John Fouhy <[EMAIL PROTECTED]> wrote: > On 29/03/06, Hoffmann <[EMAIL PROTECTED]> wrote: > > Hi John, > > > > (1) vehicle[index] is: 'c' > > (2) If index = index = 1, so vehicle[index] > becomes: > > 'a' > > What I&#x

Re: [Tutor] Program for outputing the letter backward

2006-03-28 Thread Hoffmann
--- John Fouhy <[EMAIL PROTECTED]> wrote: > On 29/03/06, Hoffmann <[EMAIL PROTECTED]> wrote: > > >>> vehicle='car' > > >>> index = 0 > > >>> lenght =len(vehicle) > > >>> last = vehicle[lenght -1] > > &

Re: [Tutor] Program for outputing the letter backward

2006-03-28 Thread Hoffmann
--- John Fouhy <[EMAIL PROTECTED]> wrote: > On 29/03/06, Hoffmann <[EMAIL PROTECTED]> wrote: > > vehicle='car' > > index = vehicle[-1] #the last letter > > index_zero = vehicle[0] #the first letter > > > > while index >= in

Re: [Tutor] Program for outputing the letter backward

2006-03-28 Thread Hoffmann
--- Kent Johnson <[EMAIL PROTECTED]> wrote: > Hoffmann wrote: > > Hello: > > > > I am trying to write a code (this is an exercose > from > > a book). The goal is to write a program that takes > a > > string and outputs the letters backward, ine

Re: [Tutor] Program for outputing the letter backward

2006-03-28 Thread Hoffmann
--- John Fouhy <[EMAIL PROTECTED]> wrote: > On 29/03/06, Hoffmann <[EMAIL PROTECTED]> wrote: > > vehicle='car' > > index = vehicle[-1] #the last letter > > index_zero = vehicle[0] #the first letter > > > > while index >= in

[Tutor] Program for outputing the letter backward

2006-03-28 Thread Hoffmann
cle[index] print letter index -= 1 The problem is that I get no output here. Could I hear from you? Thanks! Hoffmann __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection aro

Re: [Tutor] Learning Python

2006-03-28 Thread Hoffmann
her. (3) "Beginning Python", by Magnus Lie Hetland. This is all you need for a good start with python. Hoffmann __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection

Re: [Tutor] What is wrong my code?

2006-03-24 Thread Hoffmann
gt; parameters.\n''' > > > > leg1 = input('Enter the first leg of the triangle: > ') > > leg2 = input('Enter the second leg of the > triangle: ') > > > Hi Hoffmann, > > Although this works, the use of input(

Re: [Tutor] What is wrong my code?

2006-03-24 Thread Hoffmann
--- Danny Yoo <[EMAIL PROTECTED]> wrote: > > > leg1 = raw_input('Enter the first leg of the > triangle: > > ') > > leg2 = raw_input('Enter the second leg of the > > triangle: ') > > Hi Hoffmann, > > leg1 and leg2 here

[Tutor] What is wrong my code?

2006-03-24 Thread Hoffmann
Hello: Could anyone, please, let me know what is wrong with my code (shown below)? I am getting a runtime error. Thanks! Hoffmann ps: The code: #!/usr/bin/python import math print '''This program calculates the lenght of the hypotenuse of a right triangle given the lenghts

Re: [Tutor] Python & XEmacs

2006-02-22 Thread Hoffmann
> are you trying to learn Python, learn (X)Emacs, > both, or neither? > > -- wesley > Hello W Chun: Thanks for the websites. However, I DIDN'T like your last question, when you say "...neither?" That WAS NOT gentle! If you didn't like to answer a post, it is m

[Tutor] Python & XEmacs

2006-02-21 Thread Hoffmann
Hello: Could anyone, please, suggest a "tutorial" about Python Mode for XEmacs? I would like to use XEmacs, but unfortunately, I didn't find any good documentation about using it for programming in Python Thanks! Hoffmann __ Do Yo

[Tutor] Newbie question

2005-04-18 Thread Hoffmann
necessary I have the last "print" statment (last line) in the code? Thanks a lot in advance. Hoffmann __ Do you Yahoo!? Plan great trips with Yahoo! Travel: Now over 17,000 guides! http://travel.yahoo.com/p-t

Re: [Tutor] What is the best book to start? - Many Thanks!

2005-04-04 Thread Hoffmann
Hi John, Certainly, I will check it out. Many thanks! Hoffmann --- John Carmona <[EMAIL PROTECTED]> wrote: > Dear Hoffmann, I am also a Newbie and I am currently > going through "A Byte > of Python" tutorial from Swaroop C H. > > http://www.byteo

Re: [Tutor] What is the best book to start? - Many Thanks!

2005-04-02 Thread Hoffmann
your hints. Well, I will follow your hints... See you later, Hoffmann __ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com ___ Tutor maillist

Re: [Tutor] What is the best book to start?

2005-03-30 Thread Hoffmann
Hi All, I am starting to studying Python. I have some previous experience with C (beginner level). Could, anyone, please, suggest a good Python book? I have both "Learning Python" by Lutz & Ascher, and "Python How to Program" by Deitel and others. Are those good