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

Exam PCPP-32-101 All Questions

View all questions & answers for the PCPP-32-101 exam

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 (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
prabhay786
9 months, 3 weeks ago
Its C And D
upvoted 3 times
...
Moneybing
1 year, 2 months 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 ...