stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Introduction to Python programming Flashcards | StudBud
Explore
/
Introduction to Python programming
Introduction to Python programming
15 terms
·
StudBud Administration
·
13 plays
In this Quiz we will revise some of the fundamental programming concepts we have learned so far.
Flashcards
15 cards
F
Practice quiz
P
Host live
L
Questions
15
Answers
1
Lists are mutable
False
True
2
What is the correct way to create a variable and assign a string value to it in Python?
my_variable "Hello World!"
"Hello World!" = my_variable
my_variable = 5
my_variable = "Hello World!"
3
What is the purpose of a for loop in Python?
To declare a variable
To execute a block of code a set number of times
To check if a certain condition is true
To iterate through a sequence of elements
4
What is the output of the following code?
"x is positive"
""
No output
x is positive
5
What is the output of the following code?
2
4
1
3
6
A programming language is a set of rules and syntax for writing programs.
True
False
7
What is the output of the following code?
1,2
i,i,i
0,1,2
1,2,3
8
A list can only store one data type
False
True
9
What is the output of the following code?
cherry
1
apple
banana
10
What is the output of the following code?
20
10
15
5
11
What is the output of the following code?
9
6
7
5
12
What is the output of the following code?
x is zero
x is positive
x is negative
no output
13
How can you check the number of elements in a list in Python?
Using the "size" function
Using the "count" function
Using the "length" function
Using the "len" function
14
Which of the following data types can be used to store decimal numbers in Python?
int
str
float
bool
15
What is programming?
The process of designing, writing, testing, and maintaining code
The process of automating repetitive tasks using scripting
The art of creating visual effects for movies
The practice of writing code to control hardware devices