开封老梁的博客一、打印一个星星* print('*') 二、打印一行星星 1、数字乘 n=int(input('请输入星星数:')) print('*'*n) 2、for循环语句: n=int(input('请输入星星数:')) for i in range(1,n+1): print('*',end='') 3、while...
输入任意一个大写字母,生成金字塔图形 def GoldTa(input): L = [chr(i) for i in range(65, 91)] # 大写字母A--Z idA = 65 # 从A开始 # ord()函数将字母转换为Unicode数值 idInput = ord(input) num = idInput...