Basic Concepts
Conditionals + User Input
Loops
Functions
Data Aggregates
100

Name the 4 types of variables we went over in this camp

int, float, boolean, string

100

Your conditions in an if statement will be what kind of expressions? What do they equate to?

Boolean Expressions! (True or False)

100

What are the two loops we went over?

For loops and while loops

100

Keyword you need in functions

def

100

Name the 4 different times of aggregate data

lists, sets, tuples, dictionaries 

200

What do we need to concatenate two strings together? Concatenate a string and number?

two strings is + and string and number is ,

200

What type of variable is n?

n= input("Enter something")

string

200

What is the sequence that is given by range(10)

0,1,2,3,4,5,6,7,8,9

200

What are the things you pass into a function called?

Parameters/Arguments
200

Which data aggregate can also be described as key:value pairs. 

Dictionary

300

What is the escape sequence to create a horizontal tab

\t

300

How can we cast the input from string to FLOAT!

n = input("Enter something here")


n = float(input("Enter something here"))

300

How do you make sure your while loop does not turn into an infinite loop?

Make sure you increment a variable and/or cause the condition to eventually become false

300

How do you call a function?

function_name()

300

Which aggregate uses parenthesis and which uses curly brackets?

-not including dictionary

parentheses: tuples

curly brackets: sets

400

What will this equal?

47 % 3

2

400

What will print?

a = True

b = False

if a and b:

  print("Hello World")

else:

  if not(a and b):

    print("Hi World")

  else:

    print("What’s up World")

"Hi World"

400

Using a for loop, how would you print out the numbers 0-10

for i in range(11): 

    print(i)

400

What is wrong here?

def multiply(x,y,z):

    return x*y*z

    print(“The answer is “, x*y*z)

There is something after the return statement; Return statements should always be last!

400

list =  [ [1,2,3], [4,5,6], [7,8,9] ]

What value is list[2][1]

8

500

What will this equate to?

not True or True and not False or False

True

500

I want to check if a number is odd, what is the condition:

num = int(input("Enter a number here"))

if _______:

     print("This is an odd number")

else:

     print("This is an even number")


num % 2 == 1

500

Describe how you would print out the numbers from 1-10 using a while loop. 

num = 1

while (num <=10):

    print(num)

500

What will be the following output?

def square(x):   

     y = x * x    

     return y

print(square(square(2)))

16

500

How can I append a value to a list?

list = []

value = 7

list.append(value)

M
e
n
u