Grade 10 Information Technology - November Practical Exam
Time Allowed: 2 Hours
Total Marks: 60
Instructions:
1. Read each question carefully.
2. Use Delphi to complete practical tasks.
3. Show all necessary steps in your code.
4. Marks for each section are indicated.
Section A: Theory (10 Marks)
Define the following programming concepts:
- Casting
- Boolean data type [2 Marks]
Briefly explain the difference between MOD and DIV with an example. [2 Marks]
Explain how the FOR, WHILE, and REPEAT...UNTIL loops differ in their usage. [3 Marks]
Describe a practical scenario where you would use a CASE statement instead of IF or
NESTED IF. [3 Marks]
Section B: Basic Delphi Coding Concepts (20 Marks)
1. 1. Component Formatting (5 Marks)
Task: Create a simple Delphi form with the following specifications:
- Add a TButton component labeled 'Submit.'
- Add a TLabel with the caption 'Welcome to Grade 10 IT Exam.'
- Change the font color of the TLabel to blue and its size to 14.
- Set the TButton font color to green and its font style to bold.
(Show your code and include screenshots of your design)
2. 2. Basic IF and NESTED IF Statements (5 Marks)
Task: Write a Delphi procedure that:
- Takes an integer input and checks if it is:
- Positive
- Negative
- Zero
- Use an IF and NESTED IF statement structure to display the result in a label called
lblResult.
3. Mathematical Functions (10 Marks)
Write a function in Delphi for each of the following:
- Calculate and return the square root of a given number. [2 Marks]
- Calculate the area of a circle using Pi * sqr(radius). [2 Marks]
- Use RandomRange to generate a random integer between 1 and 100. [3 Marks]
- Use MOD, DIV, and Trunc to find and display:
- The remainder of 37 MOD 5.
- The integer quotient of 37 DIV 5.
- The integer part of 5.67 using Trunc.
Section C: Practical Coding (30 Marks)
3. 1. Loop and String Manipulation (10 Marks)
Task: Write a Delphi program that:
- Takes a string input from a user, where words are separated by a comma (e.g.,
'apple,banana,grape').
- Use a FOR loop to go through the string, extract each word, and display it in a ListBox
component called lstFruits.
4. 2. Working with Images and Clearing Components (10 Marks)
Task: Create a form with:
- A TImage component where an image can be loaded.
- A TButton labeled 'Clear All' which, when clicked, clears the image, resets the content
in a TEdit box, TMemo, and ListBox.
(Include a screenshot of your form design and the code for the 'Clear All' button)
3. Conditional Loops and Boolean Data (10 Marks)
Task: Write a Delphi function that:
- Uses a WHILE loop to keep doubling a number starting at 1, until it exceeds 100.
- Each time it doubles, store the number in a TMemo.
- Once the loop finishes, display "Exceeded 100" in a TLabel if the last value exceeded 100,
using a Boolean variable to track if this condition was met.