python - How remove the Space from the bottom of the output? -
i trying following output?
* ** *** ** * here code in python
n = int(input(" please enter number: ")) j=1 while j<=n: print('*'* j) j+=1 while n>=1: print('*'* (n-1)) n=n-1 #print(n) but problem gives me following output
* ** *** ** * getting space after output. does know reason behind , remedy same.
you need
while n>=2: in last loop. otherwise further line 0 (1-1=0) stars plotted @ end
Comments
Post a Comment