Question 5 - Week 6 Practice | Prasnya
Prasnya
Continue with Google
Practice path
Dashboard
Exam
Qualifier / Quiz 1
Go to subject
Programing with python
Go to chapter
Week 6
Question 5
00:00
Est. 2 min
Marks:
+4.00
0.00
`P` is a non-empty list of distinct integers that has already been defined. Which of the following statements are true at the end of execution of the code given below? ``` Q, R = [], [] for x in P: Q.append(-x) Q.sort() for x in Q: R.append(-x) ```
Multiple correct
Medium Difficulty
13 July 2025
A
`P` is always equal to `R`, i.e., `P == R` returns the value `True`
B
Every element in `P` is present in `R`, but not necessarily in the same sequence.
C
`R` is a list of integers sorted in descending order.
D
`Q` is a list of integers sorted in ascending order.