[Tutor] small program
ziniatinklis at gmail.com
Fri Oct 2 18:44:26 CEST 2009
Ok ok, smarty! Don't be very cool! Nobody asks you a favor, nobody
asks your advices as well. There are plenty 'advisers' to say where to
see, but not too much able to explain. Keep quiet.
On 02/10/2009, bob gailer <bgailer at gmail.com> wrote:
> Andrius wrote:
>> There are interesting online course
>> where I'm trying to learn Python.
>> Looks quite interesting and I would like to create a program which
>> should repeat a simply string several times with list number before.
>> Like "1. Wanna more. 2. Wanna more. ..."
>> Suppose to a loop here repeating, say x times. Should it look like that:
>> y="Wanna more. "
>> print d+y
>> How to create a program for such kind of task?
> Pardon my skepticism - I'm guessing you are taking the course and this
> is homework. We prefer not to do your homework for you. If it is not
> homework - we prefer not to write programs for you.
> Unfortunately Benno gave you a solution.
> If you want to learn Python read on:
> In regard to the above code - did you try to run it? That is step one.
> Try to run it. See if you can figure out why it fails. Hint there are 2
> syntax errors.
> At python.org there are links to several tutorials which will show you
> how to repeat operations.
> To repeat things in Python we can use a loop. What Python statements are
> used for loops?
> Bob Gailer
> Chapel Hill NC
More information about the Tutor