Programming Fundamentals Flashcards
What is iteration
the repetition of statements in a computer program
What is selection
Which path a program is going to take
What sort of results will selection give
boolean results
give 2 examples of iteration
for loops
while loops
What is nesting
when a programming construct is included within another
what is a variable
A named memory address that stores a value
What is a constant
something that allows the value to be assigned a name
What is the difference between a global and local variable
global variable can be accessed and changed, local variables are confined to a loop or subprogram
what is casting? give an example
changing the data type of a variable
for example: str(24.5) returns “24.5”
list 4 ways of string manipulation
length
upper and lowercase
character position
concatenation
how do you open a file to read
file = openRead(“scores.txt”)
How do you write to a file
file.writeLine(scores[x])
list the 3 commands that can be used to retrieve data from a database
SELECT
FROM
WHERE
what does * stand for in SQL? What does it mean
wildcard, it means from all records
what can the LIKE command do?
find matches from an incomplete word