Skip to content

Add Expressions and Statements HW #1446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: pb-java-march-20
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions EN/01-Expressions-and-Statements/08-Homework.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ Create a program to calculate the area of a triangle:
[hint]
The formula for calculating a triangle's area is - Area = 1/2 \* a \* h
[/hint]
[hint]
Format the result to the second decimal place
[/hint]
[/hints]

[/task-description]
Expand Down Expand Up @@ -376,6 +379,9 @@ Create a program to convert **days** to **minutes**:
[hint]
One day has 24 hours, one hour has 60 minutes, so one day has 1440 minutes.
[/hint]
[hint]
You need to multiply the days by 1440 (the minutes per day)
[/hint]
[/hints]

[/task-description]
Expand Down Expand Up @@ -470,7 +476,11 @@ The formula for calculating a circle's perimeter is P = 2 \* π \* R.
[hint]
The formula for calculating a circle's area is: A = π \* R \* R.
[/hint]
[hint]
You can get the value of π by using **Math.PI**.
[/hint]
[/hints]

[/task-description]
[tests]
[test open]
Expand Down Expand Up @@ -558,6 +568,12 @@ Create a program, which:
| Ireland | |
| Cork | |

[hints]
[hint]
Format the result using **System.out.printf("%s %s from %s - %s!", firstName, lastName, country, town);**
[/hint]
[/hints]

[/task-description]
[tests]
[test open]
Expand Down Expand Up @@ -744,6 +760,12 @@ Print out the calculated area.
| 5 | 25 |
| 6 | 36 |

[hints]
[hint]
Use the formula side \* side
[/hint]
[/hints]

[/task-description]
[tests]
[test open]
Expand Down Expand Up @@ -1002,6 +1024,12 @@ Printout a single number - the area of the trapezoid, formatted to the **second
| 13 | |
| 7 | |

[hints]
[hint]
Calcuate the result **double result = (b1+b2)\*h/2;** and then print with **System.out.printf("%.2f", result);**
[/hint]
[/hints]

[/task-description]
[tests]
[test open]
Expand Down Expand Up @@ -1317,6 +1345,12 @@ Print out: "\{**total sum**\} **dollars**". The result should be formatted to th
| 13 | 68.50 dollars |
| 9 | |

[hints]
[hint]
Use the formula **2.5 _ dogNumber + 4 _ otherNumber**
[/hint]
[/hints]

[/task-description]
[tests]
[test open]
Expand Down Expand Up @@ -1692,10 +1726,10 @@ Prices should be formatted to the **second decimal point.**

[hints]
[hint]
Calculate the price for greening the whole yard.
Calculate the price for greening the whole yard. **size \* 7.61**
[/hint]
[hint]
Calculate the discount and determine the final price.
Calculate the discount (**price \* 0.18**) and determine the final price (**price - discount**).
[/hint]
[/hints]

Expand Down