1/24
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is a ‘data type’?
Each variable has a data type.
It determines what kind of cake the variable will hold and the set of operations that can be performed with it.
What is an integer?
A whole number.
What is a Real/Float?
Numbers that can include fractions/values after the decimal point.
What is a character?
Stores a single character in a fixed-length formal related to a specific character set (e.g ASCII).
What is Boolean?
A data type that can represent two values like True and False.
What is a string?
A sequence of characters.
What is a variable?
An identifier than represents a memory location that can store a value.
This value can change during the execution of a program.
What is a constant?duri
An identifier that represents a memory location that can store a value.
This value cannot change during the execution of a program.
What is an array?
A data structure that stores a collection of elements of the same data type under a single variable name and is accessed through an index.
What is the difference between a constant and a variable?
A constant had a value that cannot change, while a variable has a value that can change.
What is an assignment?
An assignment statement sets the value of a variable/constant.
What is iteration?
The repetition of a block of code.
Why is testing important for programmers?
It helps them remove bugs from the software and ensure that it works correctly.
What is the difference between definite and indefinite iteration?
Definite iteration is used when you know how many times the loop should run.
But indefinite iteration is used when you don’t know how many times the loop should run, but you know when it should stop.
What is the difference between indefinite and definite iteration loop types?
Indefinite loop type: condition controlled (e.g., WHILE loop).
Definite loop type: count controlled (e.g., FOR loop)
What is the use case for definite iteration in programming?
Processing a fixed size list.
(e.g., Calculating the average score of 30 students → number of iterations is known from the start (30)).
What is the use case for indefinite iteration in programming?
Reading input until a condition is met.
(e.g., A number guessing game where the user guesses a secret number → number of guesses is unknown, depends if the user guesses correctly.))
What does a selection statement allow?
Allows a block of code to be executed only when a certain condition is satisfied.
List examples of a selection statement:
IF, THEN, ELSE, SWITCH/CASE/MATCH
What is a subroutine?
A named ‘out of line’ block of code that may be executed by simply writing its name in a program statement. It can be reused multiple times within a program.
What are parameters?
Variables which define the data to be passed into a subroutine when the subroutine is called.
What are local variables?
Declared within a subroutine.
Exist only while a subroutine is executing.
Are accessible only from within the subroutine.
What is a validation routine?
A routine that contains code to check the validity of data.
Validity of data refers to data being reasonable. Might involve range checks, length checks and presence checks.
What is an authentication routine?
A routine that contains code that verifies an identity.
Such as the entry of a username and password.
Ifi
What are types of testing data?