exam questions

Exam PCEP-30-02 All Questions

View all questions & answers for the PCEP-30-02 exam

Exam PCEP-30-02 topic 8 question 36 discussion

Actual exam question from Python Institute's PCEP-30-02
Question #: 36
Topic #: 8
[All PCEP-30-02 Questions]

What is the expected output of the following code?

  • A. 293
  • B. yh
  • C. The code is erroneous and cannot be run.
  • D. 12.849.923.2
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
4ba36e7
1 month, 3 weeks ago
Selected Answer: D
menu.items() returns a view object of key–value pairs from the dictionary — each one is a tuple. Each iteration of the for loop assigns one (key, value) tuple to the variable value. Iteration value value[1] printed output 1 ('syrniki', 12.8) 12.8 12.8 2 ('shashlik', 49.9) 49.9 12.849.9 3 ('borscht', 23.2) 23.2 12.849.923.2 D. 12.849.923.2
upvoted 1 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 ...