Free Printable Worksheets for learning Computer Science at the High School level

Here's some sample Computer Science quizzes Sign in to generate your own quiz worksheet.

Computer Science Quiz

Multiple Choice

  1. What is the name of the language used to create websites?

    • A) HTML
    • B) CSS
    • C) JavaScript
    • D) Python
  2. What is the purpose of an algorithm?

    • A) To solve a problem
    • B) To store data
    • C) To create a website
    • D) To create a game

True/False

  1. Computer Science is the study of how computers and computer systems work.

    • True
  2. Artificial Intelligence is the ability of a computer to think and learn.

    • True

Fill-in-the-Blank

  1. The process of breaking down a problem into smaller, more manageable pieces is called _________.

    • Decomposition
  2. In programming, a function is a block of code that performs a specific _________.

    • Task

Short Answer

  1. What is the difference between a compiler and an interpreter?
    • A compiler is a program that takes in source code and translates it into object code, which can then be executed by the computer. An interpreter is a program that takes in source code and executes it directly, without translating it into object code.

Here's some sample Computer Science practice sheets Sign in to generate your own practice sheet worksheet.

.

Computer Science Practice Sheet

Introduction to Computer Science

Computer Science is the study of how computers work and how they can be used to solve problems. It involves understanding the principles behind how computers process information, and how to create software and systems that use these principles to solve problems.

What is a Computer?

A computer is an electronic device that can take input, process it, and produce output. It is made up of hardware (the physical components) and software (the instructions that tell the computer what to do).

What is a Programming Language?

A programming language is a set of instructions that can be used to create software. It is used to tell the computer what to do by using commands and logic.

What is Algorithm?

An algorithm is a set of instructions that can be used to solve a problem. It is a step-by-step process that takes input and produces output.

What is a Data Structure?

A data structure is a way of organizing data so that it can be used efficiently. It is used to store data in a way that makes it easy to access, modify, and search.

Practice Problems

  1. Write a program that takes two numbers as input and calculates the sum of the two numbers.

  2. Write a program that takes a string as input and prints out the number of characters in the string.

  3. Write a program that takes two strings as input and determines if the two strings are anagrams of each other.

  4. Write a program that takes a list of numbers as input and prints out the maximum number in the list.

  5. Write a program that takes a list of numbers as input and sorts the list in ascending order.

Answer Key

1.

```

Program to calculate the sum of two numbers

Take two numbers as input

num1 = int(input(Enter first number:)) num2 = int(input(Enter second number:))

Calculate the sum

sum = num1 + num2

Print the result

print(The sum of the two numbers is:, sum) ```

2.

```

Program to print the number of characters in a string

Take a string as input

string = input(Enter a string:)

Calculate the length of the string

length = len(string)

Print the result

print(The number of characters in the string is:, length) ```

3.

```

Program to determine if two strings are anagrams

Take two strings as input

string1 = input(Enter first string:) string2 = input(Enter second string:)

Check if the strings are anagrams

if sorted(string1) == sorted(string2): print(The two strings are anagrams.) else: print(The two strings are not anagrams.) ```

4.

```

Program to find the maximum number in a list

Take a list of numbers as input

list = [int(x) for x in input(Enter a list of numbers:).split()]

Find the maximum number

max_num = max(list)

Print the result

print(The maximum number in the list is:, max_num) ```

5.

```

Program to sort a list of numbers in ascending order

Take a list of numbers as input

list = [int(x) for x in input(Enter a list of numbers:).split()]

Sort the list in ascending order

list.sort()

Print the result

print(The sorted list is:, list) ```

Background image of planets in outer space