You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: chapter-08-exam-preparation.md
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Chapter 8.1. Practical Exam Preparation - Part I
2
2
3
-
In **the present chapter**, we will examine a few **problems** with a level of **difficultly** that can be expected in **the problems** of the practical **exam** in “Programming Basics”. We will **review** and **practice** all the knowledge that was gained from this book and through the "Programming Basics" course.
3
+
In **the present chapter**, we will examine a few **problems** with a level of **difficulty** that can be expected in **the problems** of the practical **exam** in “Programming Basics”. We will **review** and **practice** all the knowledge that was gained from this book and through the "Programming Basics" course.
4
4
5
5
## The "Programming Basics" Practical Exam
6
6
@@ -24,7 +24,7 @@ The course **"Programing Basics"** finishes with a **practical exam**. There are
24
24
25
25
**The first** problem of the "Programming Basics" Practical Exam covers **simple calculations without checks and loops**. Here are a few examples:
26
26
27
-
### Problem: 2D Triangle Area
27
+
### Problem: Triangle Area
28
28
29
29
<table>
30
30
<tr>
@@ -78,7 +78,7 @@ The only thing left is to print the area on the console.
78
78
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/939#0](https://judge.softuni.org/Contests/Practice/Index/939#0).
79
79
80
80
81
-
### Problem: Moving Bricks
81
+
### Problem: Bricks
82
82
83
83
Construction workers have to transfer a total of **x bricks**. **The workers** are **w** and work simultaneously. They transport the bricks in trolleys, each with a **capacity of m** bricks. Write a program that reads the integers **x**, **w**, and **m**, and calculates **what is the minimum number of courses** the workers need to do to transport the bricks.
84
84
@@ -195,7 +195,7 @@ Finally, we print **the distance** which we fine before.
195
195
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/939#2](https://judge.softuni.org/Contests/Practice/Index/939#3).
196
196
197
197
198
-
### Problem: Point on a Figure
198
+
### Problem: Point in Figure
199
199
200
200
Write a program that checks if a point (with coordinates **x** and **y**) is **inside** or **outside** of the given figure:
201
201
@@ -251,7 +251,7 @@ Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/939#
251
251
252
252
**The third** problem of the "Programming Basics" Practical Exam includes **several nested checks combined with simple calculations**. Here are a few examples:
253
253
254
-
### Problem: Date after 5 days
254
+
### Problem: Date After 5 Days
255
255
256
256
There are two numbers **d** (day) and **m** (month) that form **a date**. Write a program that prints the date that will be **after 5 days**. For example, 5 days after **28.03** is the date **2.04**. We assume that the months: April, June, September, and November have 30 days, February has 28 days, and the rest have 31 days. Months to be printed with **leading zero** when they contain a single digit (e.g. 01, 08).
257
257
@@ -306,7 +306,7 @@ The only thing that remains is to print the result on the console. It is importa
306
306
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/939#4](https://judge.softuni.org/Contests/Practice/Index/939#4).
307
307
308
308
309
-
### Problem: Sums of Three Numbers
309
+
### Problem: Sums 3 Numbers
310
310
311
311
There are **3 integers** given. Write a program that checks if **the sum of two of the numbers is equal to the third one**. For example, if the numbers are **3**, **5**, and **2**, the sum of two of the numbers is equal to the third one: **2 + 3 = 5**.
312
312
@@ -361,7 +361,7 @@ Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/939#
361
361
362
362
**The fourth** problem of the "Programming Basics" Practical Exam includes a **simple loop with simple logic** in it. Here are a few examples:
363
363
364
-
### Problem: Sums with Step of 3
364
+
### Problem: Sums Step 3
365
365
366
366
There are given **n** integers **a1, a2, …, an**. Calculate the sums:
367
367
-**sum1 = a1 + a4 + a7** + … (the numbers are summed, starting from the first one with step of 3).
@@ -404,7 +404,7 @@ Finally, we will print the result on the console in the required **format**.
404
404
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/939#6](https://judge.softuni.org/Contests/Practice/Index/939#6).
405
405
406
406
407
-
### Problem: Sequence of Increasing Elements
407
+
### Problem: Increasing Elements
408
408
409
409
A series of **n** numbers is given: **a1**, **a2**, **…**, **an**. Calculate **the length of the longest increasing sequence** of consecutive elements in the series of numbers.
410
410
@@ -453,7 +453,7 @@ Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/939#
453
453
454
454
**The fifth** problem of the "Programming Basics" Practical Exam requires **using one or several nested loops for drawing** a figure on the console. Logical reasoning, simple calculations, and conditional statements may be required. The problem tests the ability of students to think logically and invent simple algorithms for solving problems, i.e. to think algorithmically. Here are some examples of exam tasks:
455
455
456
-
### Problem: A Perfect Diamond
456
+
### Problem: Perfect Diamond
457
457
458
458
Write a function that takes as a parameter **n** and draws **a perfect diamond** with size **n** as in the examples below.
459
459
@@ -483,7 +483,7 @@ We will read the number **`n`** from the parameters of the function.
We start to draw **the upper half** of the diamond. We see that **each line** starts with some **empty spaces and <code>*</code>**. If we take a closer look, we will notice that **the empty spaces** are always equal to **`n - index of row - 1`** (the first row is n-1, the second – n-2, etc.). We will start by drawing the number of **empty spaces** and **the first star**. Notice that we start to count from **0, no from 1**. After that, we'll only add a few times **`-*`** to **finish the line**.
486
+
We start to draw **the upper half** of the diamond. We see that **each line** starts with some **empty spaces and <code>*</code>**. If we take a closer look, we will notice that **the empty spaces** are always equal to the **`n - index of row - 1`** (the first row is n-1, the second – n-2, etc.). We will start by drawing the number of **empty spaces** and **the first star**. Notice that we start to count from **0, no from 1**. After that, we'll only add a few times **`-*`** to **finish the line**.
487
487
488
488
Here is the fragment from the code for **the upper part of the diamond**:
489
489
@@ -508,7 +508,7 @@ What remains is **to assemble the whole program** by first reading the input, p
508
508
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/939#8](https://judge.softuni.org/Contests/Practice/Index/939#8).
509
509
510
510
511
-
### Problem: Rectangle with Stars in The Center
511
+
### Problem: Rectangle with Stars
512
512
513
513
Write a function that takes as a parameter an integer **n** and draws **a rectangle** with size **n with 2 stars in the center** as in the examples below.
514
514
@@ -588,7 +588,7 @@ We read the input data from the function. We also create the additional variable
We will most easily solve the problem if we logically divide it **into parts**. If we are required to draw all the rows from a number between **`a`** and **`b`**, we will do it using **one loop** that takes all the numbers from **`a`** to **`b`**. Let's think about how to do this with **series of two numbers**. The answer is easy – we will use **nested loops**.
591
+
We will most easily solve the problem if we logically divide it **into parts**. If we are required to draw all the rows from a number between **`a`** and **`b`**, we will do it using **one loop** that takes all the numbers from **`a`** to **`b`**. Let's think about how to do this with a **series of two numbers**. The answer is easy – we will use **nested loops**.
0 commit comments