Skip to content

Original practice tasks · Computer science · Class 7

Algorithms . specification, search and testing — tasks with solutions

Start with the easier exercises and work your way up. Every task has a hint and a full step-by-step solution — try it on your own first, then unlock the solution and compare.

Easy

22

Medium

12

Hard

2

Task 1 · easy

Save problem specification

The program is to find the largest number in the array [4, 9, 2, 7]. Save input data and expected result.

Hint and solution →

Task 2 · medium

Maximum algorithm as a list of steps

Set up a simple list of steps to find the largest element of the non-empty array of numbers.

Hint and solution →

Task 3 · easy

Following conditional instructions

Analyze pseudocode: x = 12; if x %2 == 0, write an odd, otherwise write an odd. What will be written and why?

Hint and solution →

Task 4 · easy

Searching in an unordered set

In the array [7, 3, 11, 5, 9] we are looking for a 5 number linear method. How many elements do we have to check if we start from the left and end up after we find the value?

Hint and solution →

Task 5 · medium

What if there's no element?

The algorithm linearly searches the array [2, 6, 8] for 5. How should it end the action correctly?

Hint and solution →

Task 6 · medium

One Sort Step by Selecting

We've got a plate [6, 2, 5, 3]. In growing sorting by simple selection we find the smallest element of the whole unsorted part and replace it with the first one. What does the board look like after the first step?

Hint and solution →

Task 7 · hard

Track Full Sorting

Track the increasing sorting by selecting the array [4, 1, 3]. Enter the board after each selection minimum.

Hint and solution →

Task 8 · easy

Loop Tracking

Pseudocode: sum = 0; for each number in [2, 4, 1] make sum = sum + number. How does the sum change, and what is the result?

Hint and solution →

Task 9 · medium

Find a loop error

The algorithm is to write out 1, 2, 3. Sets i = 1, then repeats until i < 3: write and , but never changes i. What's going to happen, and how are we going to fix it?

Hint and solution →

Task 10 · medium

Select Test Cases

You design a function that returns the largest element of the non-empty array of integers. Give three different test cases that check something more than a regular growing array.

Hint and solution →

Task 11 · hard

Detect incomplete specification

The command is: .Find the largest number in the array. What important assumption is missing if the board can be empty?

Hint and solution →

Task 12 · medium

Algorithm a program

Explain the difference between the algorithm and the program using the example of searching the item in the array.

Hint and solution →

Task 13 · easy

Wyjaśnij: sortowanie

Wyjaśnij pojęcie „sortowanie” własnymi słowami.

Hint and solution →

Task 14 · easy

Rozpoznaj pojęcie

Jakie pojęcie opisuje zdanie: „porządkowanie elementów według określonego klucza”?

Hint and solution →

Task 15 · easy

Prawda czy fałsz — sortowanie

Oceń zdanie: „sortowanie: porządkowanie elementów według określonego klucza”. Odpowiedz Prawda albo Fałsz.

Hint and solution →

Task 16 · medium

Zastosuj wiedzę — sortowanie

Podaj jedną informację, która pomaga poprawnie rozumieć pojęcie „sortowanie”.

Hint and solution →

Task 17 · easy

Wyjaśnij: wyszukiwanie liniowe

Wyjaśnij pojęcie „wyszukiwanie liniowe” własnymi słowami.

Hint and solution →

Task 18 · easy

Rozpoznaj pojęcie

Jakie pojęcie opisuje zdanie: „sprawdzanie elementów kolejno aż do znalezienia szukanej wartości”?

Hint and solution →

Task 19 · easy

Prawda czy fałsz — wyszukiwanie liniowe

Oceń zdanie: „wyszukiwanie liniowe: sprawdzanie elementów kolejno aż do znalezienia szukanej wartości”. Odpowiedz Prawda albo Fałsz.

Hint and solution →

Task 20 · medium

Zastosuj wiedzę — wyszukiwanie liniowe

Podaj jedną informację, która pomaga poprawnie rozumieć pojęcie „wyszukiwanie liniowe”.

Hint and solution →

Task 21 · easy

Wyjaśnij: warunek

Wyjaśnij pojęcie „warunek” własnymi słowami.

Hint and solution →

Task 22 · easy

Rozpoznaj pojęcie

Jakie pojęcie opisuje zdanie: „wyrażenie przyjmujące wartość prawda lub fałsz”?

Hint and solution →

Task 23 · easy

Prawda czy fałsz — warunek

Oceń zdanie: „warunek: wyrażenie przyjmujące wartość prawda lub fałsz”. Odpowiedz Prawda albo Fałsz.

Hint and solution →

Task 24 · medium

Zastosuj wiedzę — warunek

Podaj jedną informację, która pomaga poprawnie rozumieć pojęcie „warunek”.

Hint and solution →

Task 25 · easy

Wyjaśnij: funkcja

Wyjaśnij pojęcie „funkcja” własnymi słowami.

Hint and solution →

Task 26 · easy

Rozpoznaj pojęcie

Jakie pojęcie opisuje zdanie: „wydzielony fragment programu realizujący określone zadanie”?

Hint and solution →

Task 27 · easy

Prawda czy fałsz — funkcja

Oceń zdanie: „funkcja: wydzielony fragment programu realizujący określone zadanie”. Odpowiedz Prawda albo Fałsz.

Hint and solution →

Task 28 · medium

Zastosuj wiedzę — funkcja

Podaj jedną informację, która pomaga poprawnie rozumieć pojęcie „funkcja”.

Hint and solution →

Task 30 · easy

Rozpoznaj pojęcie

Jakie pojęcie opisuje zdanie: „struktura przechowująca uporządkowaną kolekcję elementów”?

Hint and solution →

Task 31 · easy

Prawda czy fałsz — lista

Oceń zdanie: „lista: struktura przechowująca uporządkowaną kolekcję elementów”. Odpowiedz Prawda albo Fałsz.

Hint and solution →

Task 32 · medium

Zastosuj wiedzę — lista

Podaj jedną informację, która pomaga poprawnie rozumieć pojęcie „lista”.

Hint and solution →

Task 33 · easy

Wyjaśnij: debugowanie

Wyjaśnij pojęcie „debugowanie” własnymi słowami.

Hint and solution →

Task 34 · easy

Rozpoznaj pojęcie

Jakie pojęcie opisuje zdanie: „proces znajdowania i poprawiania błędów programu”?

Hint and solution →

Task 35 · easy

Prawda czy fałsz — debugowanie

Oceń zdanie: „debugowanie: proces znajdowania i poprawiania błędów programu”. Odpowiedz Prawda albo Fałsz.

Hint and solution →

Task 36 · medium

Zastosuj wiedzę — debugowanie

Podaj jedną informację, która pomaga poprawnie rozumieć pojęcie „debugowanie”.

Hint and solution →

Karta pracy do druku

Ten sam temat w wersji na kartkę: instrukcja, zadania i miejsce na odpowiedzi. Wydruk jest bezpłatny.

Otwórz kartę pracy →

After the tasks

Go from single tasks to a full set

Pick a ready-made material for this topic and grade, or generate a new set for more practice.

The tasks and solutions in this set are original SzkolaNa6 materials. They are not copies of tasks from a textbook or another website.