CBSE Class 12 Computer Science
Question 8 of 42
Solved 2024 Sample Question Paper CBSE Class 12 Computer Science (083) — Question 8
Back to all questionsceieP0
Reason — The code assigns the string "#G20 Presidency" to the variable pride. The slicing operation pride[-2:2:-2] starts from the second last character ("y"), which is at index -2, moves backward by 2 characters at a time due to the step value of -2, and stops before reaching the third character ("G"), which is at index 2. Hence, the output will be 'ceieP0'.