PCPP-32-101 · Question #23
Which of the following values can be returned by the messagebox.askquestion() method?
The correct answer is C. "yes" and "no". The messagebox.askquestion() method in Python's tkinter library displays a message box with a specified question and two response buttons labeled "Yes" and "No". It returns a string indicating which button was selected - either "yes" or "no". This function is used to ask…
Question
Which of the following values can be returned by the messagebox.askquestion() method?
Options
- A"accept" and "cancel"
- Bl and 0
- C"yes" and "no"
- DTrue and False
How the community answered
(42 responses)- A7% (3)
- B2% (1)
- C88% (37)
- D2% (1)
Explanation
The messagebox.askquestion() method in Python's tkinter library displays a message box with a specified question and two response buttons labeled "Yes" and "No". It returns a string indicating which button was selected - either "yes" or "no". This function is used to ask questions to the user that have only two options: YES or NO. It can be used to ask the user if they want to continue or if they want to submit something 1.
Topics
Community Discussion
No community discussion yet for this question.