Em có đọc mục Functions của Python Tutorial thì tới đoạn nó cho một ví dụ về Default Argument như sau:
Em đã thử cho chạy code nhưng không ra được kết quả, mà bị lỗi:
def ask_ok(prompt, retries=4, reminder='Please try again!'):
... while True:
... ok = input(prompt)
... if ok in ('y', 'ye', 'yes'):
... return True
... if ok in ('n', 'no', 'nop', 'nope'):
... return False
... retries = retries - 1
... if retries < 0:
... raise ValueError('invalid user response')
... print(reminder)
... ask_ok('Do you really want to quit?')
File "<stdin>", line 12
ask_ok('Do you really want to quit?')
^
SyntaxError: invalid syntax
Cho em hỏi đoạn code này phải chạy như thế nào ạ?

83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?