Question 15 - Week 1 Practice | Prasnya
Prasnya
Continue with Google
Practice path
Dashboard
Exam
Qualifier / Quiz 1
Go to subject
Programing with python
Go to chapter
Week 1
Question 15
00:00
Est. 2 min
Marks:
+4.00
0.00
Three of the following codes print the same output, while one prints a different output. Which of the following code prints a different output from the other three? Hint: `str(x)` converts `x` into a string. `'3' * 2` evaluates to `'33'`.
Single correct
Medium Difficulty
29 October 2023
A
``` print(3211 % 32) ```
B
``` print("1324"[0] + "231A"[-2]) ```
C
``` print(str(31 % 10) + str(9 // 8)) ```
D
``` print(int((str(3 * 7) * 2)[2] * 2)) ```