nerdexam
Python_Institute

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…

Advanced OOP

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)
  • A
    7% (3)
  • B
    2% (1)
  • C
    88% (37)
  • D
    2% (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

#tkinter#messagebox#dialog return values

Community Discussion

No community discussion yet for this question.

Full PCPP-32-101 Practice