Subroutine (2 Marks)
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 »
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 »
Explain the difference between ‘integer’ and ‘real’ data types with an example of when you would use each in a program.
‘Integer’ and ‘Real’ Data Types. (4 marks) Read More »
Compare and contrast the merge sort and bubble sort algorithms. Include at least two advantages and disadvantages for each algorithm.
Compare and Contrast the Merge Sort and Bubble Sort Algorithms. (6 marks) Read More »
Explain the term “data type” in the context of computer programming.
Explain the Term “Data Type”. (1 mark) Read More »
Given the following variables, identify the most appropriate data type for each: a) age b) price c) isMember d) initial e) firstName
Appropriate Data Type for each Variable. (5 marks) Read More »
Which data type would be most suitable for storing a person’s full name and why?
The Most Suitable Data Type for Storing a Person’s Full Name and Why. (2 marks) Read More »
Describe three different scenarios where a Boolean data type would be used in a computer program.
Boolean Data Type. (3 marks) Read More »
Describe how the merge sort algorithm sorts an array of integers.
How the Merge Sort Algorithm Sorts Integers. (6 marks) Read More »
Explain how the bubble sort algorithm works using an array of integers as an example.
How the Bubble Sort Algorithm Works. (6 marks) Read More »
Compare and contrast linear and binary search algorithms.
Compare and Contrast Linear and Binary Search Algorithms. (6 marks) Read More »