1.输出:
$
$$
$$$
$$$$
height = int(input("请输入行数:\n"))
for i in range(height):
for j in range(i+1):
print("$ ", end='')
print("\n")
2.获得一个大写字母(例如F),输出类似内容
F
FE
FED
FEDC
FEDCB
FEDCBA
theStr=input("please input the letter:\n")
theCode=ord(theStr)
for i in range(1,theCode-65+2):
for j in range(theCode,theCode-i,-1):
print(chr(j),end='')
print("\n")
3.获得一个大写字母(例如F),输出类似内容:
A
ABA
ABCBA
ABCDCBA
ABCDEDCBA
ABCDEFEDCBA
theStr = input('please input the letter:\n')
theCode = ord(theStr)
i = 65
while i <= theCode:
for j in range(theCo