少帅下飞机Python代码

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档


前言

提示:这里可以添加本文要记录的大概内容:

当他下飞机的那一刻,他那辉煌的一生已经结束


提示:以下是本篇文章正文内容,下面案例可供参考

1.代码

Python代码如下:

# 作者:朱亮
# 开发时间:2024/9/29 19:54
import os
import sys
import time

seconds = 20
def plane_in(postion):
    print(' '*postion + ' '*4 +'* *')
    print(' '*postion +' '*4 +'* * *')
    print(' '*postion +'*' + ' ' + '  * * *')
    print(' '*postion +'* * * * * * *')
    print(' '*postion +'* * * * * * * *')
    print(' '*postion +'* * ' + '[少帅] ' + '* *')
    print(' '*postion +'*   * * * *')
    print(' '*postion +' '*4 +'* * *')
    print(' '*postion +' '*4 +'* *')


def plane_out(postion):
    print(' '*postion +' '*4 +'* *')
    print(' '*postion +' '*4 +'* * *')
    print(' '*postion +'*' + ' ' + '  * * *')
    print(' '*postion +'* * * * * * *')
    print(' '*postion +'* * * * * * * *')
    print(' '*postion +'* * ' + '[  ] ' + '* *')
    print(' '*postion +'*   * * * *')
    print(' '*postion +' '*4 +'* * *')
    print(' '*postion +' '*4 +'* *')

def plane_out_1(postion):
    print(' '*postion +' '*4 +'* *')
    print(' '*postion +' '*4 +'* * *')
    print(' '*postion +'*' + ' ' + '  * * *')
    print(' '*postion +'* * * * * * *')
    print(' '*postion +'* * * * * * * *')
    print(' '*postion +'* * ' + '* * * ' + '* *')
    print(' '*postion +'*   [少帅] *')
    print(' '*postion +' '*4 +'* * *')
    print(' '*postion +' '*4 +'* *')
def plane_out_2(postion):
    print(' '*postion +' '*4 +'* *')
    print(' '*postion +' '*4 +'* * *')
    print(' '*postion +'*' + ' ' + '  * * *')
    print(' '*postion +'* * * * * * *')
    print(' '*postion +'* * * * * * * *')
    print(' '*postion +'* * ' + '* * * ' + '* *')
    print(' '*postion +'*   * * * ')
    print(' '*postion +' '*4 +'[少帅]')
    print(' '*postion +' '*4 +'* *')
def plane_out_3(postion):
    print(' '*postion +' '*4 +'* *')
    print(' '*postion +' '*4 +'* * *')
    print(' '*postion +'*' + ' ' + '  * * *')
    print(' '*postion +'* * * * * * *')
    print(' '*postion +'* * * * * * * *')
    print(' '*postion +'* * ' + '* * * ' + '* *')
    print(' '*postion +'*   * * * ')
    print(' ' * postion + ' ' * 4 + '* *')
    print(' '*postion +' '*4 +'[少帅]')
def plane_out_leave(postion):
    print(' '*postion +' '*4 +'* *')
    print(' '*postion +' '*4 +'* * *')
    print(' '*postion +'*' + ' ' + '  * * *')
    print(' '*postion +'* * * * * * *')
    print(' '*postion +'* * * * * * * *')
    print(' '*postion +'* * ' + '* * * ' + '* *')
    print(' '*postion +'*   * * * ')
    print(' ' * postion + ' ' * 4 + '* *')
    print(' '*postion +' '*4 +'[  ]')
def land():
    for i in range(seconds):
        os.system('cls')
        plane_in(i)
        sys.stdout.flush()
        time.sleep(0.2)
    os.system('cls')
    plane_out_1(seconds)
    print('\n' + ' '*seconds + '士兵  士兵')
    time.sleep(0.5)
    os.system('cls')
    plane_out_2(seconds)
    print('\n' + ' ' * seconds + '士兵  士兵')
    time.sleep(0.5)
    os.system('cls')
    plane_out_3(seconds)
    print('\n' + ' ' * seconds + '士兵  士兵')
    time.sleep(0.5)
    os.system('cls')
    for i in range (3):
        os.system('cls')
        plane_out_leave(seconds)
        print('\n'*i + ' '*(seconds) + '士兵 少帅 士兵')
        time.sleep(0.5)

land()

2.结果演示

结果演示

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值