Skip to content

Commit ecb2401

Browse files
committed
Chapter 2.2 - Grammarly + Upper Letter Titles
1 parent 244101c commit ecb2401

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

chapter-02-simple-calculations-exam-problems.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ let result = 3 + 5; // the result is 8
5353
let result = 3 - 5; // the result is -2
5454
```
5555

56-
### Operator *
56+
### Operator \*
5757

5858
```JavaScript
5959
let result = 3 * 5; // the result is 15
@@ -229,7 +229,7 @@ Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/928#
229229

230230
On the ground in front of an apartment building **tiles need to be placed**. The ground has a **square shape with a side of N meters**. The tiles are **"W" meters wide** and **"L" meters long**. There is one bench on the ground with a **width of "M" meters and a length of "O" meters**. There is no need to place tiles under it. Each tile is replaced for **0.2 minutes**.
231231

232-
Write a program that **reads from the console the size** of **the ground, the tiles and the bench**, and calculates **how many tiles are needed** to cover the ground and what is the total **time for placing all of the tiles**.
232+
Write a program that **reads from the console the size** of **the ground, the tiles, and the bench**, and calculates **how many tiles are needed** to cover the ground and what is the total **time for placing all of the tiles**.
233233

234234
**Example: ground with size 20 m** has an **area of 400 $$m^2$$**. **A bench** that is **1 m** wide and **2 m** long, has an area of **2 $$m^2$$**. One **tile** is **5 m wide** and **4 m long** and has an **area of 20 $$m^2$$**. **The space** that needs to be covered is **400 - 2 = 398 $$m^2$$**. **398 / 20 = 19.90 tiles** are necessary. The **time** needed is **19.90 * 0.2 = 3.98 minutes.**
235235

@@ -358,7 +358,7 @@ Let's first think of the way we can solve the task, before having started to wri
358358

359359
#### Idea for Solution
360360

361-
We see that the **number of bitcoins** and **the number of Chinese yuans** will be given in the input. The **output** should be in euro. The exchange rates that we have to work with are specified in the task. We notice that we can only exchange the sum in BGN to EUR, therefore, we **first have to calculate the whole sum** that Pesho has in BGN, and then **calculate the output**.
361+
We see that the **number of bitcoins** and **the number of Chinese yuans** will be given in the input. The **output** should be in euros. The exchange rates that we have to work with are specified in the task. We notice that we can only exchange the sum in BGN to EUR, therefore, we **first have to calculate the whole sum** that Pesho has in BGN, and then **calculate the output**.
362362

363363
As we have information for the exchange rate of Bitcoins to BGN, we can directly exchange them. On the other hand, to get the value of **Chinese yuans in BGN**, first, we have to **exchange them in USD**, and then the **USD to BGN**. Finally, we will **sum the two values** and calculate how much euro that is.
364364

@@ -417,7 +417,7 @@ Ivan is a programmer in an American company, and he **works** at home **approxim
417417

418418
Print one number on the console – **the average daily earnings in BGN**. The result will be **rounded up to the second digit after the decimal point**.
419419

420-
### Problem input and output
420+
### Sample Input and Output
421421

422422
| Input | Output |
423423
|---------------|------------------|
@@ -462,7 +462,7 @@ We do the calculations:
462462

463463
![](assets/chapter-2-2-images/05.Daily-earnings-02.png)
464464

465-
We could write an expression that calculates the annual income without brackets as well. As multiplication is an operation that has a higher priority over addition, it will be performed first. Despite that, **writing brackets is recommended when using more operators**, as this way the code is **easily readable** and chances of making a mistake are smaller.
465+
We could write an expression that calculates the annual income without brackets as well. As multiplication is an operation that has a higher priority over addition, it will be performed first. Despite that, **writing brackets is recommended when using more operators**, as this way the code is **easily readable**, and chances of making a mistake are smaller.
466466

467467
Finally, we have to print the result on the console. We notice that the number has to be rounded up to the second digit after the decimal point. To do that, we can use **`.toFixed(…)`** just like the previous task:
468468

0 commit comments

Comments
 (0)