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"
试过几种。但是好像不行,求指导
没缩进,看着眼睛疼