[Tutor] small program
Hi! There are interesting online course http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-00Fall-2008/LectureVideos/index.htm 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. " x=1 x=x+d: d=<100 print d+y How to create a program for such kind of task? Regards, Andrius ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] small program
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. Regards, Andrius On 02/10/2009, bob gailer wrote: > Andrius wrote: >> Hi! >> >> There are interesting online course >> http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-00Fall-2008/LectureVideos/index.htm >> 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. " >> x=1 >> x=x+d: >> d=<100 >> 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 > 919-636-4239 > ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] small program
Bye bye. Regards, Andrius On 04/10/2009, Luke Paireepinart wrote: > On Sun, Oct 4, 2009 at 1:59 PM, Andrius wrote: > >> Very good. Nice to hear that from another 'untouchable'. Must to >> confirm for your that I'm usually left wing fella, so, if you have >> nothing what to say for my in my case - please, fuck off. > > > Re: http://catb.org/~esr/faqs/smart-questions.html#not_losing > Good luck, > -Luke > ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor