On Thursday 25 August 2011 15:17:04 Alan Gauld wrote: > On 25/08/11 10:46, Lisi wrote: > > I copied and ran the following script: > > > > multiplier = 12 > > > > for j in range(1,13): > > print "%d x %d = %d" %(j, multiplier, j*multiplier) > > > > That ran perfectly and gave me the 12 times table. > > > > I then decided that it would be fun to branch out and make teh > > script "universal", so I wrote and ran: > > > > print "Which times table do you want?" > > > > multiplier = raw_input () > > I seem to recognise that code :-) > > You will find if you fast-forward to the "talking to the user" topic > that we revisit the multiplication table doing exactly this. You will > find out what is missing there. :-)
Thanks to all three of you for your input. I do now understand what is wrong, but can't work out how to put it right. I did as you suggested, Dave. But by the time I was able to get to my computer and read it, the others' replies had come in. So I ran it mainly to learn how to do it. And I am not entirely sure that I would have understood the result if I hadn't already known what it was meant to be saying!! I started to say that I would just have to wait, but on second thoughts I'll fast forward as suggested, and then go back to do the missing sections. Lisi _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor