NEW
Font size
WorksheetsPython Basics Quiz
Total questions: 15
Worksheet time: 8mins
Which of the following is an integer in Python?
10.5
10
"10"
True
Which of the following is a Boolean value in Python?
Yes
True
1.0
"True"
Which function is used to display output on the screen?
display()
echo()
print()
output()
Which function is used to take input from the user?
read()
input()
scan()
enter()
What will be the result of 5 + 3 in Python?
53
8
"5+3"
2
What will True and False evaluate to in Python?
True
False
1
0
Which of the following is a string in Python?
"Hello"
Hello
100
10.5
What will "Python" + "Code" output?
Python Code
PythonCode
"Python+Code"
Error
Which operator is used for multiplication in Python?
x
*
X
×
What will be the result of "Hi" * 3 in Python?
HiHiHi
9
"Hi3"
Error
What does " hello ".strip() return?
"hello"
" hello "
" hello"
"hello "
What does " hello ".lstrip() return?
"hello"
"hello "
" hello"
" hello "
What does " hello ".rstrip() return?
"hello"
" hello"
"hello "
" hello "
What does len("Python") return?
5
6
"6"
Error
What does "Python".startswith("Py") return?
False
True
"True"
Error
