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

Exam PCAP All Questions

View all questions & answers for the PCAP exam

Exam PCAP topic 1 question 45 discussion

Actual exam question from Python Institute's PCAP
Question #: 45
Topic #: 1
[All PCAP Questions]

Which line can be used instead of the comment to cause the snippet to produce the following expected output? (Choose two.)
Expected output:
1 2 3
Code:

  • A. c, b, a = b, a, c
  • B. c, b, a = a, c, b
  • C. a, b, c = c, a, b
  • D. a, b, c = a, b, c
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

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
Arulkumar
1 year, 7 months ago
Ans : C c,b,a=1,3,2 a,b,c=c,a,b print(a,b,c)
upvoted 1 times
...
666_m
2 years, 6 months ago
AC is correct.
upvoted 1 times
...
macxsz
2 years, 7 months ago
Selected Answer: AC
A. c, b, a = b, a, c C. a, b, c = c, a, b
upvoted 1 times
...
smarty_arse
2 years, 10 months ago
Answer is correct
upvoted 3 times
...
zwakenberg
3 years ago
All of them are wrong. c, b, a = b, a, c gives 1 3 2 c, b, a = a, c, b gives 2 1 3 a, b, c = c, a, b gives 1 3 2 a, b, c = a, b, c gives 3 2 1 The correct answer should be something like this a, b, c = c, b, a which gives 1 2 3
upvoted 2 times
techdawgs
2 years, 12 months ago
A & C are correct. The variables on the right of '=' are the original values and the variables on the left are the new values.
upvoted 4 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 ...