How Will it Run?
Will this Run/ Error Messages
Data Types
Functions and Keywords
About the Camp
100

def add(x, y):

   return(x + y)

add(8, 9) #what will happen?

The add(x, y) function will take x and y as inputs and return the sum of them. 

The answer is 17.

100

def sunny_day():

   print("It is sunny today!")


sunny_day()

Yes!

100

The data type of this value:

10

What is an integer?

100

Converts "90" to 90. 

What is the int() function?

100
The name of this summer camp.

What is CS + X?

200

def add_10(x):

   return(x + 10)


add_10(13)

The function, add_10(x), will take x as an input, then return the sum of it and 10. 

The answer is 23. 

200

def multiply_by_2():

   print(x * 2)


multiply_by_2()

No; we call a variable x in the function, but we never defined it. This is a Name Error.

200

The data type of this value:

10.9

What is a float?

200

Takes the number 3.1415 and converts it to 3. 

What is the int() function?

200

The name of your instructor. 

Who is Soha?

300

x = 10

y = 2

if x % y == 0:

   print(str(x) + "is divisible by" + str(y))


The computer will check if the variable, x, is divisible by the variable y. If the modulo is 0, then the computer will print out "x is divisible by y". In this case, x = 10 and y = 2, so the computer will print out "10 is divisible by 2".

300

The error I would trigger if I did not indent the code after my if-statement. 

What is an indentation error?

300

The data type of this value:

'8.9'

What is a string?

300

True or False: We can use the def keyword to create functions and assign variables to values. 

False; we use the def keyword only to create functions, NOT to assign variables to values. 

300

The names of your tutor and class assistants. 

Who are Rusha, Hannah, and Dhivya?

400

weather = 'rainy'

if weather == 'sunny':

   print("It's warm today!")

else:

   print("Bring an umbrella today!")

The computer will check if the variable, weather, is assigned to the value 'sunny'. If it is, then it will print out "It's warm today!". If it is false, it will print out "Bring an umbrella today!". Since the statement is false, it will print out "Bring an umbrella today!"

400

def cool_function():

   print("The cool function")

   cooler_function()

def cooler_function():

   print("The cooler function")

Yes!

400

The data type of this value:

[1, 2, 3, 4, 5]

What is a list?
400

Takes the string "hello world" and converts it to ['h','e','l','l','o','w','o','r','l','d']

What is list()?

400

The names of your RCs.

Who are Cheyanne and Rafael?

500
color = "red"

for i in color:

   print(i + i)


We assign color to the string "red", then enter a for-loop. The iterator variable, i, will be assigned to 'r' first. Then, 'rr' will be printed. Then, i will be assigned to 'e', and then 'ee' will be printed. Finally, i will be assigned to 'd', and then 'dd' will be printed. 
500

def list_tech(lst):

   print(lst[-7])

my_list = ["hi", "bye", "yo", "'sup", "later", "whattup"]

list_tech(my_list)

No; this will lead us to an Index out of Range error because my_list does not have an index of -7.

500

The data type of this value:

10 == 15

What is a boolean?

500

Allows us to create a collection of numbers. 

What is range()?

500

An item that was NOT included in your packing list:

A: Cleaning products

B: Umbrella

C: Lock

What are cleaning products?