标签:inpu col ntc usr author private while 描述 ==
[root@Private python-script]# cat square.py
#!/usr/local/bin/python3
#date : 2020.04.19
#author : feihuang
line=int(input("line number:"))
column=int(input("column number:"))
printline = 1
while printline <= line:
printcolumn = 1
while printcolumn <= column:
print("#",end=(" "))
printcolumn += 1
print()
printline += 1
#================================以下为实验输出==========================
"""
[root@Private python-script]# ./square.py
line number:10
column number:10
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
[root@Private python-script]# ./square.py
line number:20
column number:20
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
"""
Python Basic - 练习-提示用户输入长度跟宽度,然后输出字符“0”描述出一个正方形
标签:inpu col ntc usr author private while 描述 ==
原文地址:https://www.cnblogs.com/fei-huang/p/12720522.html