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
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
In **the current 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
-
## Practical exam on “Programming Basic”
5
+
## Practical Exam on “Programming Basic”
6
6
7
7
The **"Programming Basics"** course ends with a **practical exam**. It includes **6** problems, for which you will have **4 hours**, to solve. **Each** of the exam problems will **cover** one of the **topics** studied in the course. The themes of the problems are as follows:
8
8
@@ -20,9 +20,9 @@ The **"Programming Basics"** course ends with a **practical exam**. It includes
20
20
**How** does the testing in **Judge** work? **You upload** the source code and from the menu below you choose to compile it as a **Java** program. The program is being **tested** with a series of tests, giving **points** for each **successful** test.
21
21
22
22
23
-
## Simple Calculations – problems
23
+
## Simple Calculations – Problems
24
24
25
-
**The first** problem of the "Programming Basics" Practical Exam covers **simple calculations without checks and loops**. Here are a few examples:
25
+
**The first** problem of the "Programming Basics" Practical Exam covers **simple calculations without checks and loops**. Here are a few problems:
26
26
27
27
### Problem: Triangle Area
28
28
@@ -136,7 +136,7 @@ Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/661#
136
136
137
137
## Simple Conditions – Problems
138
138
139
-
**The second** problem of the "Programming Basics" Practical Exam covers **conditional statements and simple calculations**. Here are a few examples:
139
+
**The second** problem of the "Programming Basics" Practical Exam covers **conditional statements and simple calculations**. Here are a few problems:
140
140
141
141
### Problem: Point on a Segment
142
142
@@ -183,7 +183,7 @@ Since we do not know which **point** is on the left and which is on the right, w
We will initialize two variables that will mark whether **the point** is in one of the rectangles. When printing the message, we will check whether any of the variables has accepted a value of **`true`**. It is enough **only one** of them to be **`true`** so that the point is in the figure.
242
+
We will initialize two variables that will mark whether **the point** is in one of the rectangles. When printing the message, we will check whether any of the variables has accepted a value of **`true`**. It is enough for **only one** of them to be **`true`** so that the point is in the figure.
@@ -250,7 +250,7 @@ Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/661#
250
250
251
251
## Complex Conditions – Problems
252
252
253
-
**The third** problem of the "Programming Basics" Practical Exam includes **several nested checks combined with simple calculations**. Here are a few examples:
253
+
**The third** problem of the "Programming Basics" Practical Exam includes **several nested checks combined with simple calculations**. Here are a few problems:
254
254
255
255
### Problem: Date After 5 days
256
256
@@ -259,7 +259,7 @@ There are two numbers given - **d** (day) and **m** (month) that form **a date**
259
259
#### Input Data
260
260
261
261
The input is read from the console and consists of two lines:
262
-
- On the first line, we read an integer **d** in the range [**1 … 31**] – day. The number of the day does not exceed the number of days in that month (e.g. 28 for February).
262
+
- On the first line, we read an integer **d** in the range [**1 … 31**] – day. The number of days does not exceed the number of days in that month (e.g. 28 for February).
263
263
- On the second line, we read an integer **m** in the range [**1 … 12**] – month. Month 1 is January, month 2 is February, …, month 12 is December. The month may contain a leading zero (e.g. April may be written as 4 or 04).
264
264
265
265
#### Output Data
@@ -307,7 +307,7 @@ The only thing that remains is to print the result on the console. It is importa
307
307
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/661#4](https://judge.softuni.org/Contests/Practice/Index/661#4).
308
308
309
309
310
-
### Problem: Sums of 3 Numbers
310
+
### Problem: Sums 3 Numbers
311
311
312
312
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**.
313
313
@@ -363,7 +363,7 @@ Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/661#
363
363
364
364
**The fourth** problem of the "Programming Basics" Practical Exam includes a **single loop with simple logic** in it. Here are a few examples:
365
365
366
-
### Problem: Sums with Step of 3
366
+
### Problem: Sums Step 3
367
367
368
368
We are given **n** integers: **a1, a2, …, an**. Calculate the sums:
369
369
-**sum1 = a1 + a4 + a7** + … (the numbers are summed, starting from the first one with step of 3).
@@ -407,7 +407,7 @@ Finally, we will print the result on the console in the required **format**.
407
407
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/661#6](https://judge.softuni.org/Contests/Practice/Index/661#6).
408
408
409
409
410
-
### Problem: Sequence of Increasing Elements
410
+
### Problem: Increasing Elements
411
411
412
412
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.
413
413
@@ -515,7 +515,7 @@ What remains is **to assemble the whole program** by first reading the input, pr
515
515
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/661#8](https://judge.softuni.org/Contests/Practice/Index/661#8).
516
516
517
517
518
-
### Problem: Rectangle with Stars in the Center
518
+
### Problem: Rectangle with Stars
519
519
520
520
Write a program that reads from the console an integer **n** and draws a **rectangle** with size **n with two asterisks in its center** as in the examples below.
521
521
@@ -599,7 +599,7 @@ We will read the input data from the console. We also create the additional vari
It will be easier to 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**.
602
+
It will be easier to 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**.
@@ -620,7 +620,7 @@ Finally, we will check if **the counter** is equal to **0** and we will print "*
620
620
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/661#10](https://judge.softuni.org/Contests/Practice/Index/661#10).
621
621
622
622
623
-
### Problem: Generating Rectangles
623
+
### Problem: Generate Rectangles
624
624
625
625
By a given number **n** and **a minimum area m**, generate all possible rectangles with integer coordinates in the range [**-n…n**] with an area of at least **m**. The generated rectangles must be printed in the following format:
0 commit comments