What is wrong with this syntax?
Print('hello world')
P should be lowercase:
print('hello world')
what has a "name" and a "value"?
variable
name a movie about women in tech
facilitator discretion
(ex. hidden figures, ...)
conditionals can also be called what?
if statements
what are the two types of loops?
for loops
while loops
What is the difference between = and ==
= assigns
== checks for equality
what type can be assigned using double or single quotation marks?
string
Born in 1852, this woman is considered to be the first computer programmer.
Who is Ada Lovelace?
what is the correct way to write "else if" in python?
elif
when might you use the function range(5)?
what is the symbol for "not equal" in python?
what type can be assigned a sequence of objects?
list
This computer scientist and digital activist based at the MIT Media Lab, is the founder of the Algorithmic Justice League, where she identifies bias in artificial intelligence and develops practices for accountability.
Who is Joy Buolamwini?
what does the indentation mean after a conditional statement?
code that is only run if condition is met
What is it called when your while loop condition is always true?
what is wrong with this syntax?
if x == 6
print('x is an integer')
Every conditional needs a colon!
if x == 6:
print('x is an integer')
True and False are what type of variable?
boolean variables
what percent of students who receive computing degrees are women of color? (within 5%)
2%
when given the choice between "if" and "elif", why would you chose one over the other?
"if" is checked no matter what, "elif" is only checked when the "if" condition is not met. a series of "elif" statements will be faster than a series of "if statements"
what is it called when you have a for loop inside another for loop?
nested for loop
L = ["this", "that", 234, [9, "apple", 42, "42", [8, 24, "cap"]], 2]
What is the correct syntax to retrieve the string "42" from the list L?
L[3][2]
what does it mean for a variable to be "immutable"?
it means it cannot be changed
Who came up with the term "debugging"?
Grace Hopper
What will the following code print when run? (Hint: Code trace)
first = 10
second = 20
third = 30
if first >= second and first >= third:
print("Oldest is",first)
elif third >= first and third >= second :
print("Oldest is",second)
elif second >= first and second >= third:
print("Oldest is",third)
else:
print("All are equal")
It will print "Oldest is 20"
numbers = [1,2,3,4,5]
Given the list below, write a loop that will print out the square of each number.
for i in numbers:
print(i*i)