[Courses] [python] Lesson 1: Hello world
svyelunite at gmail.com
Sun Jun 26 17:01:01 UTC 2011
Sorry to be so late!
1. I'm running debian squeeze/sid and Python 2.5.4.
2. Of course I've read all the answers but I had guessed the concatenation
part but not the space part.
3. Monty Python!! I'm a big fan myself :-)
And now to lesson number 2! Thanks a lot for the course.
On 25 June 2011 03:41, Akkana Peck <akkana at shallowsky.com> wrote:
> Hrvoje G writes:
> > 1. I was wondering if I could end lines with ";" as I'm used to that -
> > out you can.
> > print "Hello world" is the same as
> > print "Hello world";
> > - am I correct?
> Yes, it should generally work, but I'd urge you not to do that --
> you'll drive Python programmers crazy wondering why you put those
> semicolons in there. :-)
> They're there so that you can put two statements on the same line:
> print "Hello" ; print "world"
> but it's very rare to want to do that in Python -- I don't think
> I've ever encountered it in a program.
> > 3. I was wondering if I could multiply two numbers that I got from
> > but it seems raw_input returns a string and it looks like Python doesn't
> > convert types automatically.
> Correct. I'll be talking about that in a later lesson.
> Courses mailing list
> Courses at linuxchix.org
More information about the Courses