[Tutor] Python backwards program (fwd)

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Wed Apr 13 07:02:15 CEST 2005


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