First, def a function, shut_down, that takes one arguments. Don't forget the parentheses or the colon!
Then, if the shut_down function receives an s equal to "yes", it should return "Shutting down"
Alternatively, elif s is equal to "no", then the function should return "Shutdown aborted".
Finally, if shut_down gets anything other than those inputs, the function should return "Sorry"
谷歌的翻译如下:
首先,def一个函数,shut_down它需要一个参数 s。 不要忘记括号或冒号!
然后,如果shut_down函数接收到等于“ yes ”的 s,则应返回“ Shutting down ”
或者,elif等于"no",那么函数应该返回"Shutdown aborted"。
最后,如果shut_down得到除了这些输入之外的任何东西,该函数应该返回"Sorry"
def shut_down(s):
return s
if __:
return "Shutting down"
elif ___:
return "Shutdown aborted"
else:
return "Sorry"
试过几种。但是好像不行,求指导
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.