Home > other > Python is a small white help circulation problems
Python is a small white help circulation problems
Time:10-13
Python bosses, now I only learn python for loop, how do I print the following topic, cycle or learn confused ah this can only let me use the python language, can't borrow library
CodePudding user response:
Make do with stupid method, lite version of such a great god to
l=1 Xx='*' Kk=' While True: If l & lt; 6: X='36} {: ^'. The format (xx * * l - 1) (2) L +=1 Print (x) The continue Elif (l & gt;=6) and (l & lt; ) : Num=l - 6 X='36} {: ^'. The format (xx * (36 - num * 6)) L +=1 Print (x) The continue Elif (l & gt;=10) and (l & lt; 12) : Num=l - 10 X='36} {: ^'. The format (xx * + num * 2) (14) L +=1 Print (x) The continue Elif (l & gt;=12) and (l & lt; 16) : Num=l - 12 X='36} {: ^'. The format (xx * (8 - num * 2) + kk * (2 + num * 6) + (xx * (8 - num * 2))) L +=1 Print (x) The continue The else: Break