naQonda

CBC Grade 9 KJSEA Pre-Technical Studies Practice Exam 2025 · Question 1

Task 1: Create a Simple Program Objective: Demonstrate the ability to write and debug a program. Choose ONE topic: 1. Create a Calculator: Write a Python or…

From Test 25 — KEJSEA 2025, 912/2 Pretechnical Studies (Project) · 40 marks · Topic: Computer Science, Computer Software and Data

Task 1: Create a Simple Program

Objective: Demonstrate the ability to write and debug a program.

Choose ONE topic:

1. Create a Calculator: Write a Python or Java program that can perform basic arithmetic operations (addition, subtraction, multiplication, division). The program should have a user-friendly interface, and allow for repeated operations without restarting the program.

2. Student Grade System: Develop a program that takes student grades as input and calculates the average. Based on the average, the program should categorize the performance (e.g., Excellent, Good, Needs Improvement).

Requirements:
• Program must handle input and output clearly.
• The user interface should be easy to interact with (CLI or GUI).
• Include error handling for invalid inputs (e.g., division by zero, invalid data).

Paste your complete program code below.

Answer

Sample complete answer (Python calculator): def calculator(): while True: operation = input("Choose +, -, *, / or q to quit: " ).strip() if operation.lower() == "q": break if operation not in {"+", "-", "*", "/"}: print("Invalid operation. Try again.") continue try: first = float(input("Enter the first number: ")) second = float(input("Enter the second number: ")) if operation == "+": result = first + second elif operation == "-": result = first - second elif operation == "*": result = first * second else: if second == 0: print("Division by zero is not allowed.") continue result = first /…

A complete response implements either the calculator or grade-system brief, handles input/output and invalid data, and presents readable, appropriately commented code.

Written answers can be worded differently: naQonda marks your own answer and explains it when you sign up free.

Answer this test freeGet it marked: create a free account

More Grade 9 Pre-Technical Studies questions from this test