Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam PCPP-32-101 topic 1 question 28 discussion

Actual exam question from Python Institute's PCPP-32-101
Question #: 28
Topic #: 1
[All PCPP-32-101 Questions]

Which of the following will set the button text’s font to 12 point italics Arial? (Choose two.)

  • 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'))
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
prabhay786
2 months, 3 weeks ago
Its C And D
upvoted 2 times
...
Moneybing
7 months, 2 weeks ago
Selected Answer: D
config() allows you to set a new value to the property. D correct The property responsible for storing font information is font. https://edube.org/learn/pcpp1-4-gui-programming/visiting-widgets-properties-3 However, if you try code from 4 options, only D works correctly: A, B will raise AttributeError AttributeError: 'Button' object has no attribute 'setfont' AttributeError: 'Button' object has no attribute 'ButtonFont' C has syntax error. C is missing close ")". Also, C is missing "tk.". If C needs to be correct, it should be: button = tk.Button(window,font=('Arial', '12', 'italic')) Since I have to choose 2 answer instead of 1 answer, i prefer CD. Because attribute Error is worse than syntax error.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...