Certified Professional in Python Programming (PCPP-32-101) — Question 27
Which of the following will set the button text’s font to 12 point italics Arial? (Choose two.)
Answer options
- A. button.ButtonFont('Arial' , '12', 'italic')
- B. button.setfont(('Arial', '12', 'italic'))
- C. button=Button(wnd,font=('Arial', '12', 'italic')
- D. button.config(font=('Arial', '12', 'italic'))
Correct answer: B, D
Explanation
The correct answers are B and D because both use valid methods to set the button's font properties in the expected format. Option A is incorrect because it doesn't follow the proper method syntax, and option C has a syntax error due to a missing closing parenthesis.