Programming and Algorithm 2 Flashcards
(11 cards)
Explain what is meant by Variable Scope, highlighting the difference between Global Variables and Local Variables.
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).
Explain what is meant by Black Box, Grey Box and White Box Testing.
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.
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()
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.
Explain what is meant by Recursion in programming.
Provide an English language description of a program to demonstrate
the use of recursion to implement the Factorial function
Develop a program in Python to implement the Factorial function using
recursion.
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.
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.