
Python Basics Quiz

Quiz
•
Computers
•
5th Grade
•
Hard
John Streety
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to print 'Hello, World!' in Python?
System.out.println('Hello, World!')
print('Hello, World!')
echo 'Hello, World!'
printf('Hello, World!')
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What symbol is used to start a comment in Python?
#
//
/*
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a variable in Python?
x = 5
x := 5
int x = 5
var x = 5
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? if 5 > 2: print('Five is greater than two!')
5 > 2
Nothing
Syntax Error
Five is greater than two!
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the file extension for Python files?
.pyt
.python
.pt
.py
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if you skip indentation in Python?
Warning
The code will run but with a different output
Nothing
Syntax Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many spaces are most commonly used for indentation in Python?
8
2
4
1
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Programming - Syntax & Logic Errors

Quiz
•
3rd - 12th Grade
15 questions
Year 5 Digital 2 (D)

Quiz
•
5th Grade
10 questions
Python Statements

Quiz
•
5th - 7th Grade
8 questions
Python

Quiz
•
KG - 9th Grade
15 questions
Python Skills

Quiz
•
1st Grade - Professio...
10 questions
Introduction to Python Programming

Quiz
•
5th - 9th Grade
15 questions
Python Programming

Quiz
•
5th Grade - University
11 questions
variable

Quiz
•
KG - 5th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade