Vocabulary
Functions
code
100

The definition of parameters?

What is variable used to send information to a function. 

100
What are these examples of?

Print and input

What is Subprogram

100

def adder (a, b = 0, c = 0): print (a + b + c) #Main x = 6 y = 9 adder (5) adder ( 3, 6) adder ( 1, 2, 3)

5
9
6

200

What is the definition of method/function/subprogram?

What is a collection of commands given a name.

200

Main function?

The central part of the program

200

def average(a, b, c):

 print( 1.0*(a + b + c)/3)

#MAIN

n1 = int(input ("First number: "))

n2 = int(input ("Second number: "))

n3 = int(input ("Third number: "))

average(n1, n2, n3)

if the numbers are 10, 20, 30

20.0

300

What is the definition of Main program?

What is The central part of the program. 

300

What does "def" do?

What is Stands for define/ creates a method 

300

def example ():

 print ("Code in the SubProgram")


# ******* MAIN *******

print ("Code in Main")

example()

Code in Main
Code in the SubProgram

400

Def score (a,b = 10) b is a ________ parameter. 

What is optional?

400

What is the primary use of functions?

What is To organize longer programs.

400

##Subprogram 

def Mskay (): 

    print("Computer science rocks!") 

##Main Program 

Mskay() 

#call on the "play"

Computer science rocks!