
Basic Python Concepts
Quiz
•
Computers
•
9th Grade
•
Practice Problem
•
Medium
Deki Om
Used 1+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the main data types in Python?
boolean, character, array
string, number, object
float, string, boolean
The main data types in Python are: int, float, str, list, tuple, set, dict.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a variable in Python?
You declare a variable in Python by using the syntax: variable_name = value.
let variable_name = value
variable_name : value
var variable_name = value
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of an if statement?
To declare a function in a program.
The purpose of an if statement is to control the flow of execution in a program based on conditions.
To create a loop that runs multiple times.
To define a variable in a program.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the difference between 'while' and 'for' loops.
The main difference is that 'while' loops are condition-based and can run indefinitely, while 'for' loops are count-based and run a specific number of times.
'For' loops can run indefinitely while 'while' loops cannot.
'While' loops are always faster than 'for' loops.
'While' loops require a specific number of iterations to execute.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a function in Python?
A function in Python is a defined block of code that performs a specific task and can take inputs and return outputs.
A function in Python is a graphical user interface component.
A function in Python is a type of variable that stores data.
A function in Python is a built-in method that cannot be modified.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you import a module in Python?
load module_name
require module_name
import module_name
include module_name
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: print(type(5))?
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?
Similar Resources on Wayground
20 questions
Quiz
•
7th - 12th Grade
10 questions
NHTW Programming
Quiz
•
9th Grade
10 questions
Bài tập Tin học lớp 4
Quiz
•
1st - 12th Grade
13 questions
Five Nights At Freddy's: Security Breach Quiz
Quiz
•
KG - Professional Dev...
14 questions
Bài 29. Nhận biết lỗi chương trình
Quiz
•
9th - 12th Grade
20 questions
Unit Test 1 Class 8 Computer
Quiz
•
8th - 9th Grade
11 questions
CAPÍTULO 1 NETWORKING ESSENTIALS
Quiz
•
1st - 12th Grade
10 questions
Activity 1: How well do you know Java?
Quiz
•
9th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
