while loop

Larry Martell larry.martell at gmail.com
Tue Oct 11 14:10:11 EDT 2016


On Tue, Oct 11, 2016 at 1:58 PM,  <dhawanpawan32 at gmail.com> wrote:
>
> n=6
> x=1
> while x<=n:
>     print "*"*x
>     x+=1
> while n>=x:
>     n=n-1
>     print "*"* n
>
>
> Only first loop is executing not the second one?

Because after the first loop n < x



More information about the Python-list mailing list