[Tutor] (no subject)

Kent Johnson kent37 at tds.net
Tue Mar 17 21:14:32 CET 2009


On Tue, Mar 17, 2009 at 3:16 PM, Jared White <dukelx2005 at gmail.com> wrote:

> howmany = int(raw_input('How many lines '))
> rhowmany = howmany
> strout = '*'
> while howmany > 0:
>     print strout
>     strout += '*'
>     howmany -= 1

Another hint: learn how to use the range() function and for loops:

In [1]: for i in range(4)
   ...:     print i

0
1
2
3

Kent


More information about the Tutor mailing list