Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

F452 Computing

1 Program Constructs

TermDefinition
Statement A single instruction within the algorithm (which can be executed), e.g. Input X.
Keyword Word which is already used for a purpose within the language. Reserved word/cannot be used as an identifier.
Identifier Symbolic name given to a variable, constant or subroutine.
Sequence All instructions are executed once in the order in which they appear.
Selection A condition is used to determine whether or not sections of code will be executed. E.g. IF....THEN....(ELSEIF...)ENDIF / SELECT CASE
SELECT (CASE) Value of variable/expression used to decide which of a number of statement blocks is executed. There can be a default option.
Advantages of SELECT over IF All the alternatives depend on the value of one variable. So this makes the code clearer and easier to read/write. Allows multiple branches and avoids nested Ifs. Avoids numerous repeats of similar conditions.
Iteration Code is executed repeatedly for a given number of times or until a condition is met.
Count controlled loop (FOR) FOR loop is set up with a fixed number of iterations. Uses loop variable. E.g. FOR Count = 1 TO 10.....NEXT Count.
Condition controlled loops (WHILE / REPEAT UNTIL) WHILE loop runs repeatedly depending on a condition (it repeats while the condition is true. E.g. WHILE Count < 11….. END WHILE. REPEAT UNTIL loop repeats until some condition becomes true. E.g. REPEAT … UNTIL Count > 10.
Parameter A description of an item of data supplied to a subroutine. It is given an actual value/address when the subroutine is called. It is used as a variable within subroutine.
Procedure A named section of code which performs a task. Can be called from parent program and returns control to parent program when complete. Used as a statement in the main program. Can be sent parameters.
Function A named section of code. It is called as part of an expression e.g. Num = LENGTH(Name) which returns a single value when called. The value replaces the function call.
RETURN Return tells the program to exit the function and supplies the value which will be used by the main program.
OUTPUT Output tells the program to display a value on the user interface.
Recursion When a subroutine calls itself with different parameter(s) until a stopping condition is met, (when it ‘unwinds’).
Advantages of iteration Uses only one set of variables so more efficient use of memory and can be faster. Less likely to run out of stack space.
Disadvantages of iteration Algorithm may be more difficult to follow/trace because variables are being reused. Need to be careful to get conditions of loops correct. Humans often express the problem in a recursive way (rather than an iterative way).
Advantages of recursion Can be easier to program or more intuitive with an inherently recursive algorithm.
Disadvantages of recursion Uses many sets of variables (one set per call) therefore less efficient use of memory and often slower and can run out of stack space causing run
Nesting When a construct is written completely contained within another. They are not allowed to overlap.
Created by: Chelsea2760
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards