What is a variable?
An element, feature, or factor that can change in an experiment.
What is a string?
A string is a data type used to represent text.
What is a conditional?
A statement expressing that one thing is contingent on or happens under a certain condition.
What is a function?
A function in coding is a reusable block of self-contained code designed to perform a specific task
What is the definition of debugging a code?
Debugging is the process of finding, analyzing, and fixing errors (bugs) within a computer program to ensure it runs correctly and efficiently.
When do you use a variable?
To store data for later.
What is the result in (“5” + “5”);
55
Why do you need conditionals?
They allow you to link a cause condition or decision to a specific outcome or action.
How does a function work?
A function performs a specific task when called and may return a value. Some functions return nothing.
What would happen if you didn't debug a code?
The system would fail and would have unpredictable behavior.
True or False: This is an example of a true variable, var price=5
True
True or False: Both numbers and words need quotation marks.
False
What would happen if you did not have conditionals?
Programs would lose decision-making capability and perform the same actions regardless of conditions.
How does a function shorten the code?
A function shortens code by reusing a single block of instructions instead of writing the same logic out over and over again.
How do you know if you need to debug a code?
If you get an error or your code doesn’t run properly
What would happen if variables were not a thing?
It would make the code break down.
What does the symbol * mean?
Multiplication
True or False most programming languages the code an if block executes only when its condition to true?
True
"Can it be declared once, but called twice or declared twice, but called once or called as many times as you want?"
It should be declared once, but called twice
What's the difference between a red square and a yellow triangle?
A red error icon indicates an error that must be fixed for the program to run properly, while a yellow warning icon indicates a potential issue that may not stop the program from running.
What are the two main types of variables and what do they mean?
Dependent variables and independent variables.
Which one is correct? “\n” or “/n”
"\n"
What are the three main types of conditionals?
A if statement, if-else statement, and lastly a else if.
What is the difference between declaring a function and calling a function?
What is the difference between declaring a function and calling a function? The difference between declaring a function and calling a function is whether you are defining how the function works or actually executing its code.
What happens if you put “var” at the bottom?
It depends on the program. If a variable is used before it is declared, it may cause errors or unexpected behavior.