|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
Write a Python program to display the following pattern using two, nested while loops:
***
* *
* *
* *
* *
* *
***
Create the variable output23 and use it inside the while loop to construct the string that you want to display at the end of the program. The pattern is 5 characters wide by 7 characters tall (not including newlines).
You might consider a solution where two nested while loops control which horizontal line you are creating with an interior, nested loop that considers which vertical column you are addressing like:
row = 0
column = 0
while row < 7:
while column < 5:
# do something to output23 for this (row, column)...
column += 1
# add a newline then...
column = 0
row += 1
求解,这个没有规律可循呀,😭 |
|