Variables
Strings & operations
Conditionals
Functions
Debug the code
100

What is a variable.

anything that is able or apt to change, vary, or take on different values.

100

What is a string & operators

A sequence of characters (letters, numbers, symbols, or spaces) treated as text, typically enclosed in quotation marks

100

What does Conditional mean?

Answer: Conditional means a feature or statement that alters a execution / running path based on if the condition is true or false

100

What is the main purpose of adding a function?

To make a set of instructions into a single block so its easier to understand

100

A student writes this code to greet a user but gets a syntax error: print("Hello, " + name)       What did they forget to do before running this line?


They never created or assigned a value to the variable name.

200

What should a variable not be used for.

ruin code maintainability, introduce security risks, or cause hard-to-track bugs.

200

What is the short term for string operators

string ops

200

When do you use conditional

Answer: To have a true or false question or statements.

200

What is the difference between defining a function and calling a function?

Actually Creates shortcut while calling it out.

200

Look at this code meant to check if someone can ride a roller coaster: height = 55  if height > 48  print("Enjoy the ride!")  What punctuation mark did the programmer forget at the end of the line?


A colon :

300

What is a short term for the word variable

It is var

300

what are string operators used for?

They are used to combine compare text data

300

What do you use conditionals for?

Answer: True or false questions on an exam or a Way ground test, public Q&A’s with only two choices or when on a quiz as a question is multiple choice with only 2 option EX: “Is darkness the absence of light? Yes or No”

300

What is a function parameter and how does it make a function more flexible?

A parameter is a placeholder variable inside a function that lets you use different pieces of info into the function each time you call it.

300

A programmer wants a loop to print the word "Hello" exactly 3 times. Instead, the program prints "Hello" forever without stopping. What is the bug?  count = 1   while count <= 3: print("Hello")

They forgot to increase count inside the loop (like count = count + 1), so count stays 1 forever.

400

What symbol represents a value that can change in a program?

A variable

400

f a program executes the expression "Data" + "Science", what is the resulting value?

“Data Science”

400

How do you use conditional statements?

Answer: You use them if only the there is a true or false question anything more than that wouldn't be a conditional as it is not only limited to two answers

400

You write a function called updateHealth. The function updateHealth can be called multiple times from different parts. True or false

Answer; true

400

A student wants to calculate a total price with a $5 discount. They write:  price = 20  discount = 5  total = price + discount  What type of bug is this?

A logic error because they added the discount instead of subtracting it.

500

What is the difference between a local and a global variable?

A local variable is available only within a function or block; a global variable can be accessed throughout the program.

500

When using the indexing operator to access the very first character of a string, the index number used is always 1?

0

500

What will happen IF you put a rock in acid water?

Answer:It will cause a chemical reaction, depending on the rock or what type it is. Or how strong the acid is.

500

A function must be defined in your code before the line that calls it 

True or false?

Answer; False

500

You want to check if a user typed the secret password "pizza". You write: guess = input("Enter password: ")  if guess = "pizza":  print("Access Granted")  Why does this code cause a syntax error?

A single = is only used to assign values to variables.

M
e
n
u