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 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 (?) , you can switch to a simple comment.
Switch to a voting comment New
Arulkumar
11 months, 2 weeks ago
Ans : C c,b,a=1,3,2 a,b,c=c,a,b print(a,b,c)
upvoted 1 times
...
666_m
1 year, 10 months ago
AC is correct.
upvoted 1 times
...
macxsz
1 year, 11 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, 2 months ago
Answer is correct
upvoted 3 times
...
zwakenberg
2 years, 4 months 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, 3 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 ...