【单选题】对于函数ask,以下调用错误的是哪一项?1. def ask(prompt = "Do you like Python? ", hint = "yes or no"):2. while True:3. answer = raw_input(prompt)4. if answer.lower() in ('y', 'yes'):5. p...
A.
answer.lower() 是调用了string自带函数lower(),将输入转换为小写字母。
B.
调用函数ask(),在交互页面输入N,则会继续打印yes or no提示你继续输入。
C.
调用函数ask(),在交互页面输入x,则会打印yes or no,如果继续输入y,则会打印Thank you并退出ask()函数的执行同时返回值true。