
Python Libraries Quiz
Authored by Danilo Perez
Computers
11th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
29 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to output "Hello, World!" in Python?
echo "Hello, World!"
print("Hello, World!")
printf("Hello, World!")
cout << "Hello, World!"
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid variable name in Python?
`1variable`
`variable_1`
`variable-1`
`variable 1`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? ```python x = 5 y = 10 print(x + y) ```
`5`
`10`
`15`
`50`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
`5`
`6`
`8`
`9`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you start a comment in Python?
`//`
`#`
`/*`
`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? ```python for i in range(3): print(i) ```
`0 1 2`
`1 2 3`
`0 1 2 3`
`1 2 3 4`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is used to define a function in Python?
`function`
`def`
`func`
`define`
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?