Conceptual Actual Emended Exam Questions
With Reviewed 100% Correct Detailed Answers
Guaranteed Pass!!Current Update
1. What is the output of the following code?
python
CopyEdit
print(10 > 9)
A) False
B) 10
C) True
D) Error
2. Which keyword is used to determine if a value is of a specific data type?
A) type()
B) cast()
C) isinstance()
D) valueof()
3. What will this code print?
python
CopyEdit
print(bool("Hello"))
, A) True
B) False
C) Error
D) None
4. What data type is returned by input()?
A) int
B) float
C) str
D) bool
5. Which of the following values will evaluate to False in a Boolean context?
A) "False"
B) 0
C) "0"
D) [1, 2]
6. What does the following code output?
python
CopyEdit
a = 4.5678
print(format(a, ".2f"))
A) 4.5678
B) 4.57
C) 4.56
D) 4.5700
, 7. Which method removes whitespace from both ends of a string?
A) trim()
B) strip()
C) clean()
D) remove()
8. What is the output of this code?
python
CopyEdit
print("one", end=" ")
print("two")
A) one
two
B) onetwo
C) one two
D) Error
9. Which module must you import to generate random numbers?
A) math
B) random
C) numbers
D) decimal
10. What does this code do?
python
CopyEdit