Python 入门函数:打印特殊符号

 

Python 入门函数:打印特殊符号

等待用户输入 字母名字,

通过对 26 个字母的设定,设置自己要输出的字体。

name=input('请输入你的名字(拼音符合):')
name=name.upper()
for c in name:
    if c == 'A':
        print('''-----A-----
---A---A---
--A-A-A-A--
-A-------A-''', '\n')

    elif c == 'B':
        print('''---B-B-B---
---B--B----
---B--B----
---B-B-B---''', '\n')

    elif c == 'C':
        print('''---C-C-C---
--C--------
--C--------
---C-C-C---''', '\n')

    elif c == 'D':
        print('''---D-D-D---
---D----D--
---D----D--
---D-D-D---''', '\n')

    elif c == 'E':
        print('''---E-E-E---
---EEE-----
---EEE-----
---E-E-E---''', '\n')

    elif c == 'F':
        print('''---F-F-F---
---F-------
---F-F-F---
---F-------''', '\n')

    elif c == 'G':
        print('''---G--GG---
--G--------
--G---GG---
---G--GG---''', '\n')

    elif c == 'H':
        print('''--H-----H--
--H--H--H--
--H--H--H--
--H-----H--''', '\n')

    elif c == 'I':
        print('''--II-I-II--
-----I-----
-----I-----
--II-I-II--''', '\n')

    elif c == 'J':
        print('''-----J-----
-----J-----
--J--J-----
---J-J-----''', '\n')

    elif c == 'K':
        print('''---K---K---
---K-K-----
---K-K-----
---K---K---''', '\n')

    elif c == 'L':
        print('''--L--------
--L--------
--L--------
--L-L-L-L--''', '\n')

    elif c == 'M':
        print('''--M-----M--
--M-M-M-M--
--M--M--M--
--M-----M--''', '\n')

    elif c == 'N':
        print('''--N-----N--
--N-N---N--
--N--N--N--
--N---N-N--''', '\n')

    elif c == 'O':
        print('''----OOO----
--OO---OO--
--OO---OO--
----OOO----''', '\n')

    elif c == 'P':
        print('''---P-P-P---
---P----P---
---P-P-P----
---P--------''', '\n')

    elif c == 'Q':
        print('''----QQQ----
--QQ---QQ--
--QQ-Q-QQ--
----QQQ--Q-''', '\n')

    elif c == 'R':
        print('''--R-RR-----
--R---R----
--R-RR-----
--R---R----''', '\n')

    elif c == 'S':
        print('''----SS-----
--SS---SS--
-SS---SS---
----SS-----''', '\n')

    elif c == 'T':
        print('''--TT-T-TT--
-----T-----
-----T-----
-----T-----''', '\n')

    elif c == 'U':
        print('''--U-----U--
--U-----U--
--U-----U--
---U-U-U---''', '\n')

    elif c == 'V':
        print('''--V-----V--
---V---V---
----V-V----
-----V-----''', '\n')

    elif c == 'W':
        print('''-W---W---W-
--W--W--W--
---W---W---
----W-W----''', '\n')

    elif c == 'X':
        print('''--X-----X--
----X-X----
----X-X----
--X-----X--''', '\n')

    elif c == 'Y':
        print('''--Y-----Y--
---Y---Y---
-----Y-----
-----Y-----''', '\n')

    elif c == 'Z':
        print('''--Z--Z--Z--
-------Z---
----Z------
--Z--Z--Z--''', '\n')

    elif c == ' ':
        print('''-----------
-----------
-----------
-----------''', '\n')

    elif c == '.':
        print('''----..-----
---..-..---
---..-..---
----..-----''', '\n')
    

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值