Programming and Algorithm 2 Flashcards

(11 cards)

1
Q

Explain what is meant by Variable Scope, highlighting the difference between Global Variables and Local Variables.

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

List the seven (7) principles of Universal Design, and suggest two (2) new
principles that might replace Principles 6 and 7. Create 3-5 guidelines for the
two (2) new principles (for either developers or users).

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

Explain what is meant by Black Box, Grey Box and White Box Testing.

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

When a stack is implemented as an array it needs two (2) variables, which are
MaxSize and StackTop, and an array called Stack, explain the purpose of these
three features.

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

Describe using either PseudoCode or Python how you would implement
the following modules for a stack implemented as an array:
* CreateStack()
* IsEmpty()
* IsFull
* Push(N)
* Pop()
* Top()

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

Develop a Menu-Driven Python program to implement the modules from
Question 2(b) ensuring that all modules that have parameters are supplied
with those values, and all return values from the modules are captured, and an
appropriate message is passed to the user.

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

Explain what is meant by Recursion in programming.

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

Provide an English language description of a program to demonstrate
the use of recursion to implement the Factorial function

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

Develop a program in Python to implement the Factorial function using
recursion.

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

Write a program in Python to open a text file and add the phrase “This
is the start of the file” to the start of the file.

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

Write a program in Python to open a text file and add the phrase “This
is the end of the file” to the end of the file.

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