【发布时间】:2020-10-15 08:49:38
【问题描述】:
所以基本上我想在 cmd 中为 python aand 构建一个自动星形字母打印机 ValueZ() 是一个例子,还有 27 个,我想根据用户输入打印它们,但它只打印“Value + 用户想要的字母”,但我希望它像函数一样返回
def valueZ():
for row in range(7):
for col in range(4):
if col == 0 or row % 3 == 0:
print('.', end='')
else:
print(end=' ')
print()
while True:
def answerfind():
answer = input("enter the letter which you want it to be printed with stars :")
newAnswer = "value{deger}".format(deger=answer + "()")
return (newAnswer)
answerfind()
顺便说一句,如果我打错了,我很抱歉,英语是我的第二语言,我 16 岁,只是想学习这个 python 东西
编辑:字母看起来像这样
.....
.
.
......
.
.
.
(看起来它已损坏,但它不像 cmd 中的那样)
【问题讨论】:
-
请edit您的问题并显示您想要的输入和输出示例。
标签: python function for-loop if-statement format