Skip to content

Commit 505d091

Browse files
committed
small fixes
1 parent 55547d0 commit 505d091

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
lines changed

Diff for: Content/Chapter-1-first-steps-in-programming/exercises-graphical-and-web-apps/exercises-graphical-and-web-apps.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Now we are about to build one simple **web application** and one simple **graphi
44

55
## Console, Graphical and Web Applications
66

7-
With **console applications**, as you can figure out yourselves, **all operations** for reading input and printing output are **done through the console**. **The input data is inserted** in the console, which is then read by the application, also in it, and the **output data is printed** on the console after or during the runtime of the program.
7+
With **console applications**, as you can figure out yourselves, **all operations** for reading input and printing output are **done through the console**. **The input data is entered** in the console, which is then read by the application, also in it, and the **output data is printed** on the console after or during the runtime of the program.
88

99
While a console application **uses the text console**, web applications **use web-based user interface**. To **execute them**, two things are needed – **a web server** and **a web browser**, as **the browser** plays the main role in **the visualization of the data and the interaction with the user**. Web applications are much more pleasant for the user, they visually look better, and a mouse and touch screen can be used \(for tablets and smartphones\), but programming stands behind all of that. And this is why **we have to learn to program** and we have already made our first very little steps towards that.
1010

Diff for: Content/Chapter-3-2-simple-conditions-exam-problems/exam-problems/pipes-in-pool/pipes-in-pool.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ After we have **the value of the quantity** of water that has flown through the
4646

4747
We do that with a simple **`if-else`** statement, where the condition will be whether **the quantity of water is less than the volume of the pool**. If the statement returns **`true`**, we have to print **one** line that contains **the ratio** between the quantity of **water that has flown through the pipes** and **the volume of the pool**, as well as the **ratio of the quantity of the water** from **each pipe** to the **volume of the pool**.
4848

49-
The ratio has to be in **percentage**, that is why all the calculations so far will be **multiplied by 100**. The values will be inserted with **placeholders**, and as there is a condition **the result in percentage** to be formatted to **two digits** after **the decimal** point **without rounding**, we will use the method **`Math.Truncate(…)`**.
49+
The ratio has to be in **percentage**, that is why all the calculations so far will be **multiplied by 100**. The values will be printed using **placeholders**, and as there is a condition **the result in percentage** to be formatted to **two digits** after **the decimal** point **without rounding**, we will use the method **`Math.Truncate(…)`**.
5050

5151
![](/assets/chapter-3-2-images/02.Pipes-in-pool-03.png)
5252

Diff for: Content/Chapter-7-1-complex-loops/web-app/web-apps-with-complex-loops.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ Now we have to prepare the fruits for drawing in the view. Add the following cod
4444

4545
![](/assets/chapter-7-images/15.Fruits-06.png)
4646

47-
The above code defines the fields for **number of rows, number of columns**, **fruit table** \(playing field\), **points** accumulated by the player and information whether the game is active or **ended** \(field `gameOver`\). The playing field has 9 columns in 3 rows and contains for each field a text stating what is inside it: `apple`**, **`banana`**, **`orange`**, **`kiwi`**, **`empty`** or **`dynamite`.
47+
The above code defines the fields for **number of rows, number of columns**, **fruit table** (playing field), **points** accumulated by the player and information whether the game is active or **ended** (field `gameOver`). The playing field has 9 columns in 3 rows and contains for each field a text stating what is inside it: `apple`**, **`banana`**, **`orange`**, **`kiwi`**, **`empty`** or **`dynamite`.
4848
The main action `Index ()` prepares the game field by recording in the `ViewBag` the structure of the game elements and invoking the view that draws them into the game page of the web browser as HTML.
4949

5050
## Generate Random Fruits
5151

52-
We need to generate random fruits. To do this, we need to write a `GenerateRandomFruits()` method with the code from the image below. This code records in the matrix `fruits` names of different images and thus builds the playing field. Each cell of the table records one of the following values: `apple`**, **`banana`**, **`orange`**, **`kiwi`**, **`empty`** or **`dynamite`. Next, to draw the corresponding image in the view, the text of the table will be merged with `.png` and this will give the name of the picture file that has to be inserted into the HTML page as part of the playing field. Filling in the playing field \(9 columns with 3 rows\) happens in the view `Index.cshtml` with two nested `for` loops \(for row and column\).
52+
We need to generate random fruits. To do this, we need to write a `GenerateRandomFruits()` method with the code from the image below. This code records in the matrix `fruits` names of different images and thus builds the playing field. Each cell of the table records one of the following values: `apple`**, **`banana`**, **`orange`**, **`kiwi`**, **`empty`** or **`dynamite`. Next, to draw the corresponding image in the view, the text of the table will be joined with the suffix “`.png` and this will give the name of the picture file that has to be inserted into the HTML page as part of the playing field. Filling in the playing field (9 columns with 3 rows) happens in the view `Index.cshtml` with two nested `for` loops (for row and column).
5353

54-
In order to generate random fruit for each cell, a **random number** is generated between 0 and 8 \(see the class `Random` in .NET\). If the number is 0 or 1, we place `apple`, if it is between 2 and 3, we place `banana` and so on. If the number is 8, we place `dynamite`. Obviously, the fruits appear twice as often as the dynamite. Here's the code:
54+
In order to generate random fruit for each cell, a **random number** is generated between 0 and 8 (see the class `Random` in .NET). If the number is 0 or 1, we place `apple`, if it is between 2 and 3, we place `banana` and so on. If the number is 8, we place `dynamite`. Obviously, the fruits appear twice as often as the dynamite. Here's the code:
5555

5656
![](/assets/chapter-7-images/15.Fruits-07.png)
5757

@@ -69,7 +69,7 @@ Now we add the **game images** \(they are part of the project files for this pro
6969

7070
Drawing Fruits in `Index.cshtml`:
7171

72-
In order to **draw the playing field** with the fruits, we need to rotate **two nested loops** \(for rows and columns\). Each row consists of 9 images, each of which contains an `apple`, `banana` or other fruit, or empty `empty`, or `dynamite`. Images are drawn by printing an HTML tag to insert a picture of the type `<img src = "/images/apple.png" />`. Nine pictures are stacked one after the other on each row, followed by a new line with a `<br>`. This is repeated three times for the three lines. Finally, the player's points are printed. Here is what **the code** for drawing the playing field and points looks like:
72+
In order to **draw the playing field** with the fruits, we need to rotate **two nested loops** \(for rows and columns\). Each row consists of 9 images, each of which contains an `apple`, `banana` or other fruit, or empty `empty`, or `dynamite`. Images are drawn by printing an HTML tag to insert a picture: `<img src = "/images/apple.png" />`. Nine pictures are stacked one after the other on each row, followed by a new line with a `<br>`. This is repeated three times for the three lines. Finally, the player's points are printed. Here is what **the code** for drawing the playing field and points looks like:
7373

7474
![](/assets/chapter-7-images/15.Fruits-09.png)
7575

Diff for: resources/TODO.txt

+3-11
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1-
Редактирано до края на глава 10
2-
---------------------------
3-
41
Page size: 17.78 x 25.4 cm (10 x 7 in) + bleed
52

63
Advertisment banner (English)
74

8-
Spell check all the text
5+
[done] Spell-check all the text
96

10-
Check all video links
7+
[done] Check all video links
118

129
Front cover (with videos)
1310

1411
Back cover
1512

1613
Sample Input and Output -> fix table sizes
1714

18-
download -> drag and drop
19-
We download from the bar on the left
20-
2115
Review the document structure (H1, H2, H3, ...)
2216

23-
Inserting number --> reading number
24-
2517
Add screenshot of softuni.org virtual classroom
2618

2719
Check whether the .md files in each chapter match the table of contents (SUMMARY.md)
2820

29-
Fix the colors for the links, e.g. this link has wrong color: https://stackoverflow.com/questions/411752.
21+
Fix the colors for the links, e.g. this link has wrong color: https://stackoverflow.com/questions/411752.

0 commit comments

Comments
 (0)