Programming (Flowcharts And Pseudocode) Flashcards
Describe what is meant by ‘data type’
The data type determines what type of value the variable will hold.
Define ‘integer’, ‘real’, ‘Boolean’, ‘character’ and ‘string’ data types
Integer - used to store whole numbers - i.e. those without a decimal point.
Real/ Float - A number with a decimal point.
Boolean - True or False.
Character – A single letter, number, punctuation mark
String - Letters and numbers
How to declare and assign constants and variables:
Describe ‘iteration’
Iteration is when a program needs to repeat certain steps until told otherwise, or until a condition has been met. Iteration is also often referred to as looping, since the program ‘loops’ back to an earlier line of code. Sections of code that are iterated are called loops.Iteration enables programmers to greatly simplify a program. Instead of writing out the same lines of code again and
again, a programmer can write a section of code once, and ask the program to execute it again and again until it is no longer needed.
Describe ‘selection’
Selection is a programming construct where a section of code is run only if a condition is met. In programming, there are occasions when a decision needs to be made. Selection is the process of making a decision. The result of the decision determines which path the program will take next.
How to use definite (count controlled) iteration
Explain definite (count-controlled) iteration
Count-controlled iteration repeatedly executes a section of code a fixed number of predetermined times. It uses the statements for and next to determine what code is repeatedly executed and how many times.
How to use indefinite (condition controlled) iteration
Explain indefinite (condition controlled) iteration
Condition-controlled iteration (also known as indefinite iteration) is when a set of instructions is repeated based on whether a condition evaluates as True or False . Types of condition-controlled iteration include while loops, do while loops, and repeat until loops.
How to use nested structures:
Explain nested structures:
Nesting occurs when one programming construct is included within another. Nesting allows for powerful, yet simple programming. It reduces the amount of code needed, while making it simple for a programmer to debug and edit. Different types of construct can be nested within another.
Explain the need for meaningful identifiers
Choosing meaningful names for the variables , constants and subroutines makes it easier for the next person to work on the code to understand it. These names are called identifiers and they usually follow certain rules: They can contain letters and numbers but must start with a letter.
How to write code that accepts keyboard input
How to write code to display output on a screen
How to write code to perform string operations ‘length’, ‘position’, ‘substring’ and ‘concatenation’