[Tutor] Python backwards program (fwd)

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Wed Apr 13 20:43:35 CEST 2005



---------- Forwarded message ----------
Date: Wed, 13 Apr 2005 09:01:16 -0500
From: Jim and Laura Ahl <jcahl at psci.net>
To: Danny Yoo <dyoo at hkn.eecs.berkeley.edu>
Subject: Re: [Tutor] Python backwards program (fwd)

Danny

I cannot write a program that gives me a double letter.

I can get each letter separate or pieces or parts of the word

Jim
  ----- Original Message -----
  From: Danny Yoo
  To: jcahl at psci.net
  Cc: Tutor
  Sent: Wednesday, April 13, 2005 12:02 AM
  Subject: Re: [Tutor] Python backwards program (fwd)



  Hello Jim,


  > I have read about loops, strings, tuples.

  Can you show us an example of a loop?  Can you show us the last program
  that you've written?

  It sounds like you've done a lot of reading.  The problem with learning
  how to program is that you can't just read it: you actually have to write
  programs and watch them run.  I think you need to make that book knowledge
  into something concrete.

  For example, If we give you some string, like:

  ######
  s = "hello world"
  ######

  can you get Python to say:

  ######
  hheelllloo  wwoorrlldd
  ######

  That is, can you write a program that will print out each letter in 's',
  but doubled up?



  > I am wasting you guys time.

  I do not know that.  We will not do your homework for you, so if you're
  just expecting a direct homework solution, we will not help you, and you
  will be wasting our time.

  But if you're really interested in learning, start asking questions, and
  start playing with the interpreter.  If there is something you do not
  understand yet, we'll do what we can to help you find good answers, and
  we'll try to point you toward resources that can help.

  And we'll try to be your cheering squad, if you need one.


  Best of wishes to you.




More information about the Tutor mailing list