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
_
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
= 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
_
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
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
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.
>
>
--- 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:
> >
>
--- 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
--- 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:
> >
> &
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
--- 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
--- 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
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
--- 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
--- John Fouhy <[EMAIL PROTECTED]> wrote:
> On 29/03/06, Hoffmann <[EMAIL PROTECTED]> wrote:
> > >>> vehicle='car'
> > >>> index = 0
> > >>> lenght =len(vehicle)
> > >>> last = vehicle[lenght -1]
> > &
--- 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
--- 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
--- 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
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
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
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(
--- 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
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
> 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
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
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
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
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
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
29 matches
Mail list logo