Python Quiz
<-- Quizzes
Are you ready to start the quiz?
Start
What is a correct syntax to output "Hello World" in Python?
print('hello world')
p('hello world')
echo "hello world"
echo ('hello world')
Next
Which one is NOT a legal variable name?
Myvar
my_var
_myvar
my-var
Back
Next
What is the correct file extension for Python files?
.pt
.pyth
.py
.pyt
Back
Next
What is the correct syntax to output the type of a variable or object in Python?
print(type(x))
print(typeof x)
print(typeOf(x))
print(typeof(x))
Back
Next
Which method can be used to remove any whitespace from both the beginning and the end of a string?
trim()
ptrim()
len()
strip()
Back
Result
Try Again
Correct Answers
↓
What is a correct syntax to output "Hello World" in Python?
print('hello world')
p('hello world')
echo "hello world"
echo ('hello world')
Which one is NOT a legal variable name?
Myvar
my_var
_myvar
my-var
What is the correct file extension for Python files?
.pt
.pyth
.py
.pyt
What is the correct syntax to output the type of a variable or object in Python?
print(type(x))
print(typeof x)
print(typeOf(x))
print(typeof(x))
Which method can be used to remove any whitespace from both the beginning and the end of a string?
trim()
ptrim()
len()
strip()