请检查下面的代码,我只是想了解问题(第二个函数)到底要什么????
def createRMagicSquare(row1,row2,row3,row4):
magic_square = [row1,row2,row3,row4]
for i in magic_square:
print(” “.join(map(str,i)))
return magic_square
def displayRMagicSquare(magic_square):
## START CODE HERE
???????????????????????????????????????????????? # What shall I write here??
## END CODE HERE
c = createRMagicSquare([23, 22, 18 ,87], [89, 27, 9 ,25] , [90, 24 ,89 ,16] , [19, 46 ,23 ,11])
displayRMagicSquare(c)
现在我的问题是,'defRMagicSquare(magic_square)'函数到底要求什么?
我已经在'def createRMagicSquare(row1,row2,row3,row4)'中编写了完整的代码,但为了达到预期的输出,我将在第二个函数中编写什么内容?
创建和显示之间的实际区别是什么,显示等于打印还是返回????
预期输出---] >>
23 22 18 87 89 27 9 25 90 24 89 16 19 46 23 11
请帮助!
请检查下面的代码,我只是想了解问题(第二个函数)到底要什么???? def createRMagicSquare(row1,row2,row3,row4):magic_square = [row1,row2,row3,...
您正在createRMagicSquare()
中实现预期的输出,我认为不需要displayRMagicSquare()