Programming (Flowcharts And Pseudocode) Flashcards

1
Q

Describe what is meant by ‘data type’

A

The data type determines what type of value the variable will hold.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define ‘integer’, ‘real’, ‘Boolean’, ‘character’ and ‘string’ data types

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to declare and assign constants and variables:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe ‘iteration’

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe ‘selection’

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to use definite (count controlled) iteration

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain definite (count-controlled) iteration

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to use indefinite (condition controlled) iteration

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain indefinite (condition controlled) iteration

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to use nested structures:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain nested structures:

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Explain the need for meaningful identifiers

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How to write code that accepts keyboard input

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How to write code to display output on a screen

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How to write code to perform string operations ‘length’, ‘position’, ‘substring’ and ‘concatenation’

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How to write code to cast one data type as another

A
17
Q

How to write code to perform string operations ‘length’, ‘position’, ‘substring’ and ‘concatenation’

A
18
Q

How to write code that performs relational operations (combinations of less than, equal to, not equal to and greater than)

A
19
Q

How to write code that performs logical operations (AND, OR, NOT)

A