What does the following code print:
x = 15
y = 10
z = 33
print(x)
print(y)
print(z)
Instructor solution
You may exit out of this review and return later without penalty.
Programming Using Python Day 1 Review
What is coding?
How would you characterize the popularity of Python?
What can you make with Python?
What's a variable?
What's a function?
What are some advantages of Python?
What are functions for? When would you want to use a function?
What is a growth mindset?
Complete the following Mad Lib: The {adjective}, {adjective} dog slept under a {noun}.
How can you accept input in Python?
If you are playing a computer game, what are some example inputs?
What does unplugged mean in the context of computer science education?
What is code tracing?
What is the output of the following code with the input hairy
then chair
:
adj = input()
noun = input()
print("The " + adj + " dog likes the " + noun)
Comment out one line from the following code so that print(c)
prints 5
.
Describe line-by-line what the following code does:
a = 1
b = 2
c = a+b
# d = c*2
e = c*b
e -= a
What does the following code print:
x = 15
y = 10
z = 33
print(x)
print(y)
print(z)
What's the result of the following code:
a_var = 10
# a_var = 20
a_var += 1
print(a_var)
What's the difference between Code A and Code B:
Code A:
a_var = 15 # this sets a_var to 15
Code B:
a_var = 15 """this sets a_var to 15"""
What's the result of the following code:
a_var = 10
# a_var = 20
a_var += 1
print(a_var)
Write code to do as described in the comments.
Write code to print the sum of two variables, a
and b
.
Describe line-by-line what the following code does:
a = 1
b = 2
c = a+b
# d = c*2
e = c*b
e -= a
What does the following code print:
x = 15
y = 10
z = 33
print(x)
print(y)
print(z)
You may exit out of this review and return later without penalty.
OpenClass is on a mission to improve & democratize education. Through our platform, educators can share assignments privately or with our entire community to improve accessibility of the best learning resources around the world.
Our assignments guide students through research-backed study sessions to reinforce learning. If this review is relevant to your teachings, feel free to add it to one of your classes!
Our format is simple and engaging: students are asked a retrieval question, then shown corrective feedback and a multiple-choice mastery question to assess their understanding of the material. Assignments adapt to unique student needs and continue to draw questions until a student has demonstrated mastery.