永发信息网

怎么理解这个python程序啊,小白求助

答案:2  悬赏:0  手机版
解决时间 2021-03-05 09:55
  • 提问者网友:送舟行
  • 2021-03-04 20:14
temp = input("请输入一个整数:")
number = int(temp)
while number:
i = number - 1
while i:
print("",end="")
i = i - 1
j = number
while j:
print("*",end="")
j = j - 1
print()
number = number -1
最佳答案
  • 五星知识达人网友:不如潦草
  • 2021-03-04 21:23
这个执行一下就知道了
就是按一定规则输出字符
你输入一个数字,然后输出提定字符的空格 和 星号
然后空格的星号照片依次变少,就是类似下面这样
请输入一个整数:5
    *****
   ****
  ***
 **
*
全部回答
  • 1楼网友:零点过十分
  • 2021-03-04 22:53
traceback (most recent call last): file "e:\python\test_3.py", line 52, in baidu_tieba(url, begin_page, end_page) file "e:\python\test_3.py", line 30, in baidu_tieba page_data = m.decode('gbk') unicodedecodeerror: 'gbk' codec can't decode byte 0xae in position 3697: illegal multibyte sequence!
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯