Skip to content

Commit fa878ba

Browse files
authored
Update vehicle purchase instructions to be more clear (#820)
* Update vehicle purchase instructions to be more cleaar * Fix * Update wording
1 parent 4796c57 commit fa878ba

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

exercises/concept/vehicle-purchase/.docs/instructions.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ You have three tasks, one to determine if you will need one to help you choose b
99
The auto dealers in your town are all running a five year, 0% interest promotion that you would like to take advantage of.
1010
But you are not sure if you can afford the monthly payments on the car you want.
1111

12+
The monthly payment is the cars total price divided by the number of months under the five year period.
13+
1214
Implement the `canIBuy(vehicle:price:monthlyBudget:)` function that takes the following arguments:
1315
- `vehicle` - The name of the vehicle you want to buy.
1416
- `price` - The price of the vehicle you want to buy.
1517
- `monthlyBudget` - The amount of money you can afford to pay each month.
1618

1719
The function should return the following message based on the following conditions:
18-
- If the price of the vehicle is less than or equal to the monthly budget, return the message `"Yes! I'm getting a <vehicle>"`.
19-
- If the price of the vehicle is 10% above your monthly budget, return the message `"I'll have to be frugal if I want a <vehicle>"`.
20-
- If the price of the vehicle is more than 10% above your monthly budget, return the message `"Darn! No <vehicle> for me"`.
20+
- If the monthly payment of the vehicle is less than or equal to the monthly budget, return the message `"Yes! I'm getting a <vehicle>"`.
21+
- If the monthly payment of the vehicle is above your monthly budget by up to 10% (inclusive), return the message `"I'll have to be frugal if I want a <vehicle>"`.
22+
- If the monthly payment of the vehicle is more than 10% above your monthly budget, return the message `"Darn! No <vehicle> for me"`.
2123

2224
```swift
2325
canIBuy(vehicle: "1974 Ford Pinto", price: 516.32, monthlyBudget: 100.00)

0 commit comments

Comments
 (0)