stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
[Production] Python for Kids: Level 1 Flashcards | StudBud
Explore
/
[Production] Python for Kids: Level 1
[Production] Python for Kids: Level 1
70 terms
·
StudBud Administration
·
493 plays
Date: Wed., March 25, 2020
Flashcards
70 cards
F
Practice quiz
P
Host live
L
Questions
70
Answers
1
What is
Python
?
Python
is a popular language created by _____ &
released
in _____ (according to W3Schools).
Guido von Rassum, 1992
Guido van Rassum, 1991
Guido van Rossum, 1991
Guido ven Rossum, 1990
2
What is a value? _____ stored inside a _____.
Games stored inside a box.
A blueprint stored inside a bridge.
A class stored inside an object.
Data (or information) stored inside a variable.
3
The two major versions of Python are versions ______ and ______.
3.x and 4.x
1.x and 2.x
2.x and 3.x
2.1 and 3.4
4
[See graphic.] If you call the function
my_function1()
, what will be the output?
No output
"Hello from a function."
Error
Hello from a function.
5
Assume the user enters 'C'. What is the output of this code?
Your choice was 'B'.
Your choice was 'C'.
Your choice was 'A'.
Error! Error! Error!
6
There are many implementations of Python. The
CPython
implementation is the most popular implementation of Python.
False
True
7
A Boolean expression is, in programming, an _____ that _____ to True or False.
expression, abstracts
expression, evaluates
condition, calculates
statement, evaluates
8
Which condition is ‘True’?
None == None
None == True
None == False
None == 0
9
What is the output of line 3?
<class 'float'>
<class 'int'>
<class 'str'>
<class 'NoneType'>
10
What is a Boolean? A single _____ of either _____ or _____.
float, 0.0, 1.0
value, TRUE, FALSE
string, “True”, “False”
number, 1, 0
11
[See the Python code.] What is the output of this code? Select the correct answer.
16.0
8.0
16
12
12
The math module contains the function math.pow(x,y). Which returns x raised to the y power. Select the correct answer.
math.pow(2,1) returns 4
math.pow(4,2) returns 16.0
math.pow(2,2) returns 4
math.pow(1,2) returns 2.0
13
What do you type to create a
docstring
? Select one.
An opening and a closing pair of triple double quotes
An opening and a closing pair of double double quotes
An opening and a closing pair of double single quotes
An opening and a closing pair of triple single quotes
14
If you want to use the randint() function, you have to "import" the random module first. True or False?
False
True
15
[See graphic.] What is the last number to be displayed?
5
Error
6
4
16
In OOP (Object-Oriented Programming), instead of variables & functions, you code
attributes
&
methods
. True or False?
True
False
17
Guido van Rossum, the creator of the Python programming language. What is his nationality?
Finland
Iceland
Denmark
Netherlands
18
What is the output of this code?
eggs
"eggs"
spam
"spam"
19
What is the output of this code?
"spam and spam"
"eggs"
spam
eggs
20
[See graphic.] What is the output of this code?
17
16
15
21
21
What do we call the symbol used to insert single-line comments into Python code?
All the other three choices
octothorpe
hash symbol
number sign
22
What does '==' check for in Python? As opposed to '=' which is the assignment operator.
Equality
Equal to or greater than | >=
Less than | <
Greater than | >
23
What is the output of this code?
155
'155'
20
'20'
24
[See graphic.] What is the second to last number to be displayed?
4
3
2
5
25
[See the Python code.] The output of this code will be a float (a number with a decimal point). True or False?
False
True
26
Which line of code will output "na no ni"? Pick one choice.
A. output("na no ni")
print(na no ni)
print('na ni no')
print("na no ni")
27
A module is a _____ that contains Python code usually coded by others. You can "import" into your code.
website
firewall
file
server
28
In Python, the
__init__
method is used to create objects. What do we call the
__init__
method?
producer
erector
assembler
constructor
29
When teaching Python, these two variable names are used often. _____ and _____.
spam | eggs
foo | bar
toast | bagels
eggs | ham
30
What is a class? A class is like a __________.
blueprint
black box
factory
web server
31
What is
softcoding
? As opposed to
hardcoding
.
Using fixed values
Not using OOP
Using magic numbers
Using variables
32
What is Python? Python is a __________.
set of tools
programming language
development environment
text editor
33
In Dec. 2019, the latest version of Python was 3.8.1. But Python version 2.x will be retired by _____.
June 2020
Sept. 2020
April 2021
April 2020
34
Assume the user enters 'K'. What is the output of this code?
Error!
Choice is equal to 'K'.
Error
Choice is equal to 'A'.
35
In Python, you want to print “Yo!”. Fill in the BLANK.
write
println
display
print
36
Can you describe a variable as a "placeholder"? True or False?
False
True
37
Good coders
DON'T
re-invent the wheel.
DON'T
code what has been already coded before. Select 1 choice.
Reduce | Reuse | Recycle
Raggle | Raves | Raffles
Raddle | Rains | Raffles
Raises | Races | Razzles
38
You want to use the randint() function in the random module. So, you have to code "import random" at the top. True?
True
False
39
What is a method? A method is a ______ associated with an _____.
A method is a function associated with an object.
A method is an expression associated with a for loop.
A method is a conditional associated with an object.
A method is a while loop associated with a condition.
40
[See line 3.] Select the correct
Python
keyword to fill in the BLANK.
try
while
if
for
41
In the Python programming language, what does the 'None' keyword represent?
Absence of a value
Zero | 0
Empty string | “”
False
42
What is a
list
? A generic term for a _____ structure that holds _____ items.
linked, multiple
information, numeric
data, string
data, multiple
43
Who is he? Why do you need to know who he is?
Guido von Rossum, creator of the Python programming language
Guido van Rossum, creator of the Python programming language
Guido ven Rossum, creator of the Python programming language
Guido van Rossium, creator of the Python programming language
44
Which is a
statement
? As opposed to an
expression
.
A. x = 5
C. print(x)
D. All of the other choices
B. x += 3
45
In order to create objects, first you must code the class. In Python, what is the keyword you must use?
def
import
class
assert
46
What is the output of line 3?
0 | Zero
Error
None
False
47
In this paradigm (model/pattern), you code
classes
and create
objects
. Select one choice.
imperative programming
OOP (Object-Oriented Programming)
functional programming
procedural programming
48
Create a variable called
num2
, assign
num0
+
num1
to it, & output the result. Fill in the BLANKs.
num2, num0
num1, num2
num2, num3
num2, num2
49
What is a module? A module in Python is a file that contains either _____ or _____ you can use to create objects.
functions, classes
variables, functions
constants, blueprints
methods, attributes
50
The classic 1st program for most new coders is the "___________" program. Select 1 choice.
Choice D
Choice A
Choice B
Choice C
51
CLASS
is to
OBJECT
as
BLUEPRINT
is to
BRIDGE
. True or False?
True
False
52
Assume a module called xyz123. You want to use the function zipzap() in xyz123. Which line of code do you code 1st?
import XYZ123
import xyz123
import random
xyz123 import
53
What is the output of this code?
'15'
10
14
15
54
What is the 1st program new Python coders code?
print(“Yo, yo, boy!”)
print("Hello, World!")
output(“Hello, World!”)
write(‘Hello, World!’)
55
What is a
variable
? A
variable
is a _____ with a ______ that holds a _____.
space, personality, job
bag, tag, puppy
box, name, value
box, name, float
56
[See line 5.] Select the correct Python keyword to fill in the BLANK.
except
elif
else
try
57
[See line 3.] Select the correct Python keyword to fill in the BLANK.
elif
if
else
while
58
[See graphic.] How many numbers will be displayed?
6
4
5
Error
59
[See the Python code.] Line 18 is missing a keyword. Fill in the BLANK.
class
include
import
def
60
What is an object? If a class is like a __________, then an object is like a __________.
If a class is like a blueprint, an object is like a bridge made from it.
If a class is like a factory, then an object is like a car made in it.
If a class is like the sun, then an object is like the moon.
If a class is like a man, then an object is like his cat.
61
Python is an
interpreted
programming language. True or False?
True
False
62
Python is a popular language because Python
syntax
is _____.
simple
complex
fast
readable
63
What is
hardcoding
? As opposed to
softcoding
.
Using variables
Using fixed values
Using OOP
Using design patterns
64
What is a loop? What is looping? When a _____ does the same(s) action _____ and _____.
When a computer does the same action(s) over and over.
When a game does the same action(s) again and again.
When your teacher does the same action(s) sometimes and never.
When an object does the same action sometimes and whenever.
65
[See line 2.] Select the correct Python keyword to fill in the BLANK.
for
try
while
if
66
Python is processed at runtime by the ___________.
interpreter
compiler
virtual machine
server
67
[See graphic.] What is the output of this code?
No output
Error
Values in x & y are swapped.
All the values stay the same.
68
What is a function? A function is a _____ of _____ that does _____ _____.
A function is a for loop that does algebraic math.
A function is a while loop that does simple math.
A function is a switch statement that does conditional checking.
A function is a block of code that does one job.
69
[See the Python code.] The output of this code will be an integer (a whole number). True or False?
True
False
70
Which is "True" about Python? Select one answer.
Python code must be compiled.
Python refers to the snake.
Ver. 1.7 is the most popular.
CPython is an implementation.