UNIQUE 600
600 TRULY UNIQUE CONTENT - NO DUPLICATE LOGIC - CLEAN SMART WORK - NO EXAM NAME ON QUESTIONS - Answer Letter Only
1. What will print? x=30; y=40; print('yes' if x == y else 'no')
A. yes opposite
B. no because 30 == 40 is False
C. Error ==
D. yes no both
Answer: B
Rationale: no because 30 == 40 is False
2. What is output? s='loop2'; print(len(s))
A. 6 off by one
B. Error len
C. 5 because len('loop2')=5
D. 4 off by one
Answer: C
Rationale: 5 because len('loop2')=5
3. What is output? s='WGU2'; print(len(s))
A. 3 off by one
B. 4 because len('WGU2')=4
C. 5 off by one
D. Error len
Answer: B
Rationale: 4 because len('WGU2')=4
4. What is output? nums=[4, 29]; nums.append(44); print(nums)
A. Error append
B. [4, 29] no change
C. [4, 29, [44]] nested
D. [4, 29, 44] because append adds 44
Answer: D
Rationale: [4, 29, 44] because append adds 44
5. What will print? x=8; y=4; print(x * y)
A. 84 concat
B. 32 because 8*4=32
C. 12 addition not *
D. Error *
Answer: B
Rationale: 32 because 8*4=32
6. What is output? nums=[15, 4, 18, 20, 24]; nums.append(36); print(nums)
A. [15, 4, 18, 20, 24, 36] because append adds 36
B. Error append
C. [15, 4, 18, 20, 24, [36]] nested
D. [15, 4, 18, 20, 24] no change
Answer: A
Rationale: [15, 4, 18, 20, 24, 36] because append adds 36
7. What is output? print(True and True)
A. None
B. Error and
C. False opposite
D. True because True and True = True
Answer: D
Rationale: True because True and True = True
8. What will print? x=72; y=99; print(x + y)
A. 72 only
B. Error +
C. 7299 string concat
D. 171 because 72+99=171
,Answer: D
Rationale: 171 because 72+99=171
9. What will print? print(12 % 6)
A. 0 because 12%6 remainder 0
B. 2.0 float
C. 2 quotient
D. Error %
Answer: A
Rationale: 0 because 12%6 remainder 0
10. What is output? s='dict3'; print(len(s))
A. 6 off by one
B. Error len
C. 5 because len('dict3')=5
D. 4 off by one
Answer: C
Rationale: 5 because len('dict3')=5
11. What is output? s='function4'; print(len(s))
A. 8 off by one
B. 9 because len('function4')=9
C. 10 off by one
D. Error len
Answer: B
Rationale: 9 because len('function4')=9
12. What is output? nums=[29, 2, 1, 6, 19]; nums.append(60); print(nums)
A. [29, 2, 1, 6, 19, [60]] nested
B. [29, 2, 1, 6, 19] no change
C. [29, 2, 1, 6, 19, 60] because append adds 60
D. Error append
Answer: C
Rationale: [29, 2, 1, 6, 19, 60] because append adds 60
13. What is output? s='set5'; print(s.upper())
A. SET5 because upper() uppercase
B. Error upper
C. set5 lower not upper
D. set5 no change
Answer: A
Rationale: SET5 because upper() uppercase
14. What is output? s='object2'; print(s.upper())
A. object2 lower not upper
B. Error upper
C. object2 no change
D. OBJECT2 because upper() uppercase
Answer: D
Rationale: OBJECT2 because upper() uppercase
15. What is output? nums=[14, 4, 26, 25]; nums.append(32); print(nums)
A. Error append
B. [14, 4, 26, 25, 32] because append adds 32
C. [14, 4, 26, 25] no change
D. [14, 4, 26, 25, [32]] nested
Answer: B
Rationale: [14, 4, 26, 25, 32] because append adds 32
16. What is output? nums=[21, 14, 15]; nums.append(44); print(nums)
A. Error append
B. [21, 14, 15, [44]] nested
C. [21, 14, 15, 44] because append adds 44
D. [21, 14, 15] no change
Answer: C
Rationale: [21, 14, 15, 44] because append adds 44
,17. What will print? x=18; y=31; print('yes' if x < y else 'no')
A. yes because 18 < 31 is True
B. no opposite
C. Error <
D. yes no both
Answer: A
Rationale: yes because 18 < 31 is True
18. What is output? s='script8'; print(s.upper())
A. script8 no change
B. Error upper
C. SCRIPT8 because upper() uppercase
D. script8 lower not upper
Answer: C
Rationale: SCRIPT8 because upper() uppercase
19. What is output? s='function9'; print(s.upper())
A. function9 lower not upper
B. FUNCTION9 because upper() uppercase
C. function9 no change
D. Error upper
Answer: B
Rationale: FUNCTION9 because upper() uppercase
20. What will print? x=7; y=31; print('yes' if x <= y else 'no')
A. yes no both
B. Error <=
C. no opposite
D. yes because 7 <= 31 is True
Answer: D
Rationale: yes because 7 <= 31 is True
21. What is output? s='script0'; print(len(s))
A. Error len
B. 8 off by one
C. 6 off by one
D. 7 because len('script0')=7
Answer: D
Rationale: 7 because len('script0')=7
22. What is output? nums=[24, 26, 27]; nums.append(51); print(nums)
A. [24, 26, 27] no change
B. [24, 26, 27, [51]] nested
C. Error append
D. [24, 26, 27, 51] because append adds 51
Answer: D
Rationale: [24, 26, 27, 51] because append adds 51
23. What is output? nums=[2, 23, 17]; nums.append(44); print(nums)
A. [2, 23, 17, 44] because append adds 44
B. Error append
C. [2, 23, 17] no change
D. [2, 23, 17, [44]] nested
Answer: A
Rationale: [2, 23, 17, 44] because append adds 44
24. What is output? s='dict5'; print(s.upper())
A. dict5 lower not upper
B. DICT5 because upper() uppercase
C. dict5 no change
D. Error upper
Answer: B
Rationale: DICT5 because upper() uppercase
25. What is output? s='world5'; print(len(s))
, A. 6 because len('world5')=6
B. 7 off by one
C. 5 off by one
D. Error len
Answer: A
Rationale: 6 because len('world5')=6
26. What will print? print(60 // 11)
A. 5 because 60//11 floor 5
B. Error //
C. 5.5 float
D. 5 remainder
Answer: A
Rationale: 5 because 60//11 floor 5
27. What is output? nums=[10, 27]; nums.append(37); print(nums)
A. [10, 27, [37]] nested
B. [10, 27, 37] because append adds 37
C. Error append
D. [10, 27] no change
Answer: B
Rationale: [10, 27, 37] because append adds 37
28. What is output? s='WGU0'; print(len(s))
A. Error len
B. 4 because len('WGU0')=4
C. 5 off by one
D. 3 off by one
Answer: B
Rationale: 4 because len('WGU0')=4
29. What will print? print(24 // 5)
A. 4.8 float
B. Error //
C. 4 because 24//5 floor 4
D. 4 remainder
Answer: C
Rationale: 4 because 24//5 floor 4
30. What is output? s='code1'; print(s.upper())
A. code1 lower not upper
B. code1 no change
C. CODE1 because upper() uppercase
D. Error upper
Answer: C
Rationale: CODE1 because upper() uppercase
31. What is output? list(range(6,17))
A. [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] because range 6 to 16
B. [7, 8, 9, 10, 11, 12, 13, 14, 15, 16] starts 7
C. Error range
D. [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] includes 17
Answer: A
Rationale: [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] because range 6 to 16
32. What is output? list(range(6,13))
A. [7, 8, 9, 10, 11, 12] starts 7
B. [6, 7, 8, 9, 10, 11, 12] because range 6 to 12
C. Error range
D. [6, 7, 8, 9, 10, 11, 12, 13] includes 13
Answer: B
Rationale: [6, 7, 8, 9, 10, 11, 12] because range 6 to 12
33. What is output? list(range(6,15))
A. [7, 8, 9, 10, 11, 12, 13, 14] starts 7