Skip to content

Commit 41b67be

Browse files
committed
[freelancer-rates] Tidy up instructions, syncing wording across cpp, elixir and x86-64-assembly
1 parent edbd8e3 commit 41b67be

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

‎exercises/concept/freelancer-rates/.docs/instructions.md‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
# Instructions
22

3-
In this exercise you'll be writing code to help a freelancer communicate with a project manager by providing a few utilities to quickly calculate daily and
4-
monthly rates, optionally with a given discount.
3+
In this exercise, you'll be writing code to help a freelancer communicate with a project manager.
4+
Your task is to provide a few utilities to quickly calculate daily and monthly rates, optionally with a given discount.
55

66
We first establish a few rules between the freelancer and the project manager:
77

88
- The daily rate is 8 times the hourly rate.
99
- A month has 22 billable days.
1010

11-
Sometimes, the freelancer is offering to apply a discount on their daily rate (for example for their most loyal customers or for non-for-profit customers).
11+
Sometimes, the freelancer is offering to apply a discount on their daily rate (for example for their most loyal customers or not-for-profit customers).
1212

13-
Discounts are modeled as fractional numbers representing percentage, for example `25.0` (25%).
13+
Discounts are modeled as fractional numbers representing percentages, for example, `25.0` (25%).
1414

1515
## 1. Calculate the daily rate given an hourly rate
1616

17-
Implement a function to calculate the daily rate given an hourly rate:
17+
Implement a function called `daily_rate` to calculate the daily rate given an hourly rate as a parameter.
18+
The contract defines that a day has 8 billable hours.
1819

1920
```elixir
2021
FreelancerRates.daily_rate(60)
@@ -25,7 +26,7 @@ The returned daily rate should be a float.
2526

2627
## 2. Calculate a discounted price
2728

28-
Implement a function to calculate the price after a discount.
29+
Implement a function `apply_discount` to calculate the price after a discount.
2930

3031
```elixir
3132
FreelancerRates.apply_discount(150, 10)
@@ -36,7 +37,8 @@ The returned value should always be a float, not rounded in any way.
3637

3738
## 3. Calculate the monthly rate, given an hourly rate and a discount
3839

39-
Implement a function to calculate the monthly rate, and apply a discount:
40+
Implement a `monthly_rate` function to calculate the discounted monthly rate.
41+
It takes two parameters, an hourly rate and the discount in percent.
4042

4143
```elixir
4244
FreelancerRates.monthly_rate(77, 10.5)
@@ -45,9 +47,9 @@ FreelancerRates.monthly_rate(77, 10.5)
4547

4648
The returned monthly rate should be rounded up (take the ceiling) to the nearest integer.
4749

48-
## 4. Calculate the number of workdays given a budget, hourly rate and discount
50+
## 4. Calculate the number of complete workdays given a budget, hourly rate, and discount
4951

50-
Implement a function that takes a budget, an hourly rate, and a discount, and calculates how many days of work that covers.
52+
Implement a function `days_in_budget` that takes a budget, an hourly rate, and a discount, and calculates how many complete days of work that covers.
5153

5254
```elixir
5355
FreelancerRates.days_in_budget(20000, 80, 11.0)

0 commit comments

Comments
 (0)