Variables
Functions
Conditionals
Errors
Guess Output
100

What kind of variable stores text?

String

100

Function definition begins with what keyword?

def

100

What new data type was introduced in class today?

Boolean

100

What kind of error is caused by a "grammar" error in the code?

Syntax Error

100

print("num = " + str(15 + 5))

num = 20

200

What variable type stores whole numbers?

Integer

200

A function that does not return a value is known as a ___ function

void

200

Explain the difference between assignment operator and equivalence operator.

assignment: =

equivalence: ==

200

You are writing a basic calculator program. When the user tries to divide by 0, the program crashes. The crash is an example of a _____ error.

Runtime

200

var_x = "400"

var_y = 100.0

print(int(var_x) + var_y)

500

300

True / False you can not change a string variable to a float variable.

False

300

True / False

Functions in python can return multiple values.

False

300

What is the not equal to opperatior? 

!=

300

You wrote a program to convert monetary values from one currency to another, the program executes without error but the output is not correct. What kind of error would cause this behavior? 

Logic Error

300

print("num =  + str(15 + 5)")

num =  + str(15 + 5)

400

Your program combines the values of one or more strings into one continuous string. What string operation is your program preforming? 

Concatenation 

400

True / False

It is possible to call a function within within the definition of a second separate function.

True

400

Explain the not opperator.

The not operator flips the value of a boolean. 

400

What kind of error will not directly impact end users of a program?

Syntax Errors

400

def say_hello();

    print("Hello!")

say_hello()

Error

500

You are writing a function in python that returns a string value. This string value must contain the value of a float type variable, explain how this is possible. 

str(float_var)
500

When a function is defined, the values passed into the parentheses are known as parameters, what are those values called when passed into a function call? 

Arguments

500

When an if / else structure is being evaluated, the boolean structure following if must be ___ for the code within the if block to be executed. 

True

500

What is one way that you would prevent runtime errors?

Any acceptable answer

500

def remove_charachter(input_string, charachter):

    output_string = ""

    for char in input_string:

        if char != charachter:

            output_string += char

    return output_string

Nothing function is never called

M
e
n
u