惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
Microsoft Security Blog
Microsoft Security Blog
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
GbyAI
GbyAI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
V2EX
酷 壳 – CoolShell
酷 壳 – CoolShell
量子位
博客园_首页
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
P
Proofpoint News Feed
博客园 - 司徒正美
有赞技术团队
有赞技术团队
Engineering at Meta
Engineering at Meta
Last Week in AI
Last Week in AI
MongoDB | Blog
MongoDB | Blog

博客园 - 岌岌可危

免费的打印管理软件easyjen 书籍链接 CrowdStrike引起的一次失败又成功的故障恢复 简单四则运算器 方差计算,使用类和常规方式 python作业 简单java servlet的登录脚本,部署到docker 如何在Windows Server 2016上重置用户“管理员”的密码 huey在windows下使用的坑 sublimeCodeIntel在windows下安装的坑 python pip安装失败 如何创建和编译动态链接库并且在另一应用程序中调用它。 Visual Studio2019 cannot open source Django创建模型。 Django创建视图 Django创建项目和应用 无Admin权限安装python 嵌入版本和PIP,并安装Django python,Django安装在windows上 一段代码实现RPC DCOM和RPC,两者的认证过程有什么区别?
作业之打印金字塔
岌岌可危 · 2023-11-22 · via 博客园 - 岌岌可危

作业之打印金字塔

num=int(input('num'))
mid=num
for i in range(1,num+1):
    left_blank_str=" "*(mid-i)
    left_num_str=""
    right_num_str=""
    for j in range(1,i+1):
        left_num_str+=str(j)
        
        if (i-j)!=0:
            right_num_str+=str(i-j)
       
    full_str=left_blank_str+left_num_str+right_num_str
    print(full_str)

posted on 2023-11-22 10:24  岌岌可危  阅读(52)  评论(0)    收藏  举报