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

CodePudding user response:

reference 1st floor max5173 response:
stupid method, make do with 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

Brothers, infinite loop, machine son let me restart the

CodePudding user response:

refer to the second floor lzc2443047156 response:
Quote: refer to 1st floor max5173 response:
stupid method, make do with 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

Brothers, infinite loop, machine son let me restart the

Impossible brother, I guess you are forgot the last break
  • Related