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-02-simple-calculations-exam-problems.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ str = firstName + " " + lastName + " is " + age + " years old";
87
87
88
88
## Exam Problems
89
89
90
-
Now, after having revised how to make simple calculations and how to read and print numbers from the console, let's go to the tasks. We will solve a few **problems from a SoftUni entrance exam**.
90
+
Now, after having revised how to make simple calculations and how to read and print numbers from the console, let's go to the tasks. We will solve a few **problems from a SoftUni practical exam**.
Copy file name to clipboardExpand all lines: chapter-07-complex-loops.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -262,7 +262,7 @@ We can use the following idea to solve the problem:
262
262
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/1057#8](https://judge.softuni.org/Contests/Practice/Index/1057#8).
263
263
264
264
265
-
## Infinite Loops and The break Operator
265
+
## Infinite Loops and The `break` Operator
266
266
267
267
So far, we were introduced to various types of loops, learning what structures they have and how they are applied. Now, we need to understand what an **infinite loop** is, when it occurs, and how we can **break** it using the **`break`** operator.
268
268
@@ -273,7 +273,7 @@ An **infinite loop** **runs infinitely** the code of its body. With the infinite
We already know that the infinite loop executes a certain code infinitely, but what if we want at some point under a given condition to interrupt and exit the loop? The **`break`** operator comes in handy in this situation.
279
279
@@ -329,7 +329,7 @@ What remains is to add a **condition that checks if the input number is greater
329
329
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/1057#9](https://judge.softuni.org/Contests/Practice/Index/1057#9).
330
330
331
331
332
-
### The break Operator in an Infinite Loop
332
+
### The `break` Operator in an Infinite Loop
333
333
334
334
Write a function, which checks whether a given number **n** is even and if so - print it on the console. An even number can be divided by 2 without a remainder. If the number is invalid, we will print that the current number is not even and the user will need to input a new number.
335
335
@@ -353,7 +353,7 @@ Note: although the code above is correct, it will not work if the user enters te
353
353
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/1057#10](https://judge.softuni.org/Contests/Practice/Index/1057#10).
354
354
355
355
356
-
## Nested Loops and The break Operator
356
+
## Nested Loops and The `break` Operator
357
357
358
358
Now since we know what **nested loops** are and how the **`break`** operator works, it is time to figure out how they work together. To get a better idea, we should write a **function** step by step, that should make all possible combinations of **number pairs**. The first number in the pair is increasing from 1 to 3, while the second one is decreasing from 3 to 1. Our solution must continue running until **`i + j`****is not** equal to 2 (i.e. **`i = 1`** and **`j = 1`**).
Copy file name to clipboardExpand all lines: chapter-09-problems-for-champions.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ In this chapter, we will offer the reader a few **more difficult tasks**, that a
4
4
5
5
## More Complex Problems on The Studied Material
6
6
7
-
Together we will solve several programming problems that cover the material studied in the book, but are more difficult than the usual problems of the entrance exams at SoftUni. If you want to **become a programming basics champion**, we recommend practicing solving such complex tasks to make it easier for you to take exams.
7
+
Together we will solve several programming problems that cover the material studied in the book, but are more difficult than the usual problems of the practical exams at SoftUni. If you want to **become a programming basics champion**, we recommend practicing solving such complex tasks to make it easier for you to take exams.
Copy file name to clipboardExpand all lines: chapter-10-functions.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -243,7 +243,7 @@ Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/1063
243
243
244
244
Up until now, we were looking at functions that execute a particular action such as printing some text, value, or a string of characters on the console. Other than such functions, there also can be functions that **return** a value as a **result** of their execution – for example, this could the multiplication of two numbers. It will be these functions that will be the topic of our discussion in the next few lines.
245
245
246
-
### The return Keyword
246
+
### The `return` Keyword
247
247
248
248
To return a value that is the result of the function’s execution we use the return keyword. It must be **used in the body** of the function and indicates to the program to **stop the execution** of the function and **returns value** to the caller of the function which is written as an argument after the keyword ‘return’. In the example that follows, there is a function that reads two names from the console, concatenates them, and returns them as a result:
249
249
@@ -257,7 +257,7 @@ In the following example, we have a function that compares two numbers and retur
257
257
258
258
It is important to notice that the returned value by the function can be of a **different type** compared to the argument’s type - string, integer, floating-point number, etc.
259
259
260
-
#### The Code After return is Unreachable
260
+
#### The Code After `return` is Unreachable
261
261
262
262
After the **`return`** keyword in a given function, the execution of the function is terminated, and the execution of the program continues where the function was last called. If there are other instructions written after the **`return`** keyword, they will not be executed. Some IDEs (including **PyCharm**) will inform you of the following warning:
0 commit comments