/ Projects / Yr10 Review

GCSE Computer Science Kickstart! 🚀

Complete all the questions, then click "Mark My Work" at the bottom for your score!

Part 1: Theory Refresh 🧠

1. Binary Conversion

Convert the denary number 45 to an 8-bit binary number.

Convert the binary number 10110101 to denary.

2. Two's Complement

Show the 8-bit two's complement for -59.

3. Utility Software

Name and explain the utility used to fix a fragmented hard disk.

4. The Fetch-Decode-Execute Cycle

Name the three main stages of the CPU's instruction cycle.

5. Boolean Logic

A ride starts if `safetyBar` is down (True) AND `gate` is closed (True). Complete the truth table.

safetyBar gate rideStarts
True True ...
True False ...
False True ...
False False ...

Part 2: Code Comprehension & Debugging 💻

Task A: Identify the Constructs

Identify the line number for an example of each programming construct.

# Line 1 name = input("What is your name? ") # Line 2 score = 0 # Line 3 attempts_left = 3 # Line 4 # Line 5 while attempts_left > 0: # Line 6 print(f"You have {attempts_left} attempts remaining.") # Line 7 answer = int(input("What is 5 + 5? ")) # Line 8 if answer == 10: # Line 9 print("Correct!") # Line 10 score = score + 1 # Line 11 break # Line 12 else: # Line 13 print("Incorrect, try again.") # Line 14 attempts_left = attempts_left - 1 # Line 15 # Line 16 print(f"{name}, your final score is {score}.")

Task B: Spot the Bugs! 🐞

The code below is broken. Find and fix at least three errors.

Buggy Code:

favourite_subject = input(What is your favourite subject?) if favourite_subject = "Computer Science": print("That's the best subject!") else print("That's a good subject too.")

Your Corrected Code:

Part 3: Python Coding Challenge ⌨️

The Goal: A Simple "Classroom Quiz" Program

Follow the steps to build the quiz program. You can reveal a code skeleton if you need help getting started.

Step 1: Create Question & Answer Lists

You need two lists to store your questions and the corresponding answers. The order is important!

Step 2: Ask the Questions

A for loop is perfect for this. You need to iterate through the questions, print each one, and get the user's answer.

Step 3: Check the Answer and Keep Score

Inside the loop, an if statement can compare the user's answer to the correct one. Remember to create a score variable before the loop starts.

Step 4: Display the Final Score

After the loop finishes, a final print statement can show the user how well they did.

Your Code: