Subroutines Returning Values (3 marks)
Write a pseudocode subroutine that takes an integer as a parameter, doubles it if it is even, and returns the result.
Subroutines Returning Values (3 marks) Read More »
Write a pseudocode subroutine that takes an integer as a parameter, doubles it if it is even, and returns the result.
Subroutines Returning Values (3 marks) Read More »
Describe the structured programming approach and its advantages.
Structured Programming Approach (4 marks) Read More »
Explain why it is considered good practice to use local variables in subroutines.
Local Variables (2 marks) Read More »
Describe how parameters are used to pass data to a subroutine with an example.
Parameters in Subroutines (3 marks) Read More »
Discuss two advantages of using subroutines in programming.
Advantages of Using Subroutines (2 marks) Read More »
Explain what is meant by a subroutine in the context of structured programming.
Understanding Subroutines (1 mark) Read More »
Define a subroutine called CalculateVolume that takes two parameters, height and radius, and calculates the volume of a cylinder. The formula for volume is πr²h.
Subroutine (2 Marks) Read More »
Describe the difference between local and global variables within the context of functions and procedures. Provide an example of how a global variable might be used differently than a local variable in a program.
Scope of Variables (4 marks) Read More »
Explain the difference between functions and procedures in structured programming. Include an example of when you might use each in a program.
Understanding Functions and Procedures (4 marks) Read More »
What is a parameter and how does it differ from an argument?
Procedures and Functions 3 Read More »
Notifications