我怎么做这些功能
def InputName():
Name = input("Name: ")
def InputCourseName():
CourseName = input("Course: ")
设置要在中使用的名称和课程名称:
def Criacao(Name, CourseName):
global Fonte, Output, CorTexto, Raw
base = Image.open(Raw)
draw = ImageDraw.Draw(base)
draw.text((5,5), Name.upper(), font=Fonte, fill=CorTexto)
draw.text((6,5), CourseName.upper(), font=Fonte, fill=CorTexto)
如果我运行:Criacao(InputName(), InputCourseName())
,它会工作吗?你知道吗
你应该开始使用
return
然后可以使用返回的值来分配给局部变量
是的,如果您从
InputName()
函数返回Name
,并从InputCourseName()
函数返回CourseName
,它将工作。你知道吗相关问题 更多 >
编程相关推荐