Skip to content

Commit

Permalink
Concept exercise review: lasagna (JuliaLang#433)
Browse files Browse the repository at this point in the history
* Make lasagna hint appear

* Fix accidental double word

* Add some more hints

* Apply suggestions from code review

Co-authored-by: Sascha Mann <git@mail.saschamann.eu>
  • Loading branch information
angelikatyborska and SaschaMann authored Aug 11, 2021
1 parent 2bd5e82 commit 0f23b29
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions exercises/concept/lasagna/.docs/hints.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# General
# Hints

You will need to define [functions][functions] and use [arithmetic operators][arithmetics].
## General

- You will need to define [functions][functions] and use [arithmetic operators][arithmetics].

## 1. Calculate the preparation time in minutes

- Use the [`times` arithmetic operator][arithmetics] to multiply the argument by `2`.

## 2. Calculate the remaining oven time in minutes

- Use the [`minus` arithmetic operator][arithmetics] to subtract the argument from `60`.

## 3. Calculate the total working time in minutes

- Reuse the `preptime` function defined in the first step.
- Use the [`plus` arithmetic operator][arithmetics] to add the return value of `preptime` to the argument.

[functions]: https://docs.julialang.org/en/v1/manual/functions/
[arithmetics]: https://docs.julialang.org/en/v1/manual/mathematical-operations/#Arithmetic-Operators-1
2 changes: 1 addition & 1 deletion exercises/concept/lasagna/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ square_plus_one(x) = muladd(x, x, 1)
### Types

Depending on which other programming languages you know, you may expect parameters, variables or return values to have explicit type annotations.
For now, assume that that Julia will infer the types automagically and don't worry about them, we will get to the specifics of the type system in later exercises.
For now, assume that Julia will infer the types automagically and don't worry about them, we will get to the specifics of the type system in later exercises.

### Comments

Expand Down

0 comments on commit 0f23b29

Please sign in to comment.