Skip to content
Merged
Show file tree
Hide file tree
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
40 changes: 9 additions & 31 deletions exercises/concept/high-school-sweetheart/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
# Instructions

In this exercise, you are going to help high school sweethearts profess their love on social media by generating an ASCII heart with their initials:
In this exercise, you are going to help high school sweethearts profess their love on social media by generating an ASCII box with their initials:

```
****** ******
** ** ** **
** ** ** **
** * **
** **
** J. K. + M. B. **
** **
** **
** **
** **
** **
** **
***
*
❤-------------------❤
| J. K. + M. B. |
❤-------------------❤
```

## 1. Get the name's first letter
Expand Down Expand Up @@ -46,26 +35,15 @@ HighSchoolSweetheart.initials("Lance Green")
# => "L. G."
```

## 4. Put the initials inside of the heart
## 4. Put the initials inside of the ASCII box

Implement the `HighSchoolSweetheart.pair/2` function. It should take two full names and return the initials inside an ASCII heart. Make sure to reuse `HighSchoolSweetheart.initials/1` that you defined in the previous step.
Implement the `HighSchoolSweetheart.pair/2` function. It should take two full names and return the initials inside an ASCII box. You don't need to draw the box yourself - make use of the box included in the code comment. Make sure to reuse `HighSchoolSweetheart.initials/1` that you defined in the previous step.

```elixir
HighSchoolSweetheart.pair("Blake Miller", "Riley Lewis")
# => """
# ****** ******
# ** ** ** **
# ** ** ** **
# ** * **
# ** **
# ** B. M. + R. L. **
# ** **
# ** **
# ** **
# ** **
# ** **
# ** **
# ***
# *
# ❤-------------------❤
# | B. M. + R. L. |
# ❤-------------------❤
Comment on lines +45 to +47
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to include it without any spaces:

Suggested change
# ❤-------------------❤
# | B. M. + R. L. |
# ❤-------------------❤
#❤-------------------❤
#| B. M. + R. L. |
#❤-------------------❤

But the Elixir formatter adds the spaces

# """
```
17 changes: 3 additions & 14 deletions exercises/concept/high-school-sweetheart/.meta/exemplar.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,9 @@ defmodule HighSchoolSweetheart do
i2 = initials(full_name2)

"""
****** ******
** ** ** **
** ** ** **
** * **
** **
** #{i1} + #{i2} **
** **
** **
** **
** **
** **
** **
***
*
❤-------------------❤
| #{i1} + #{i2} |
❤-------------------❤
"""
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,9 @@ defmodule HighSchoolSweetheart do
end

def pair(full_name1, full_name2) do
# ****** ******
# ** ** ** **
# ** ** ** **
# ** * **
# ** **
# ** X. X. + X. X. **
# ** **
# ** **
# ** **
# ** **
# ** **
# ** **
# ***
# *
# ❤-------------------❤
# | X. X. + X. X. |
# ❤-------------------❤

# Please implement the pair/2 function
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,9 @@ defmodule HighSchoolSweetheartTest do
test "prints the pair's initials inside a heart" do
assert HighSchoolSweetheart.pair("Avery Bryant", "Charlie Dixon") ==
"""
****** ******
** ** ** **
** ** ** **
** * **
** **
** A. B. + C. D. **
** **
** **
** **
** **
** **
** **
***
*
❤-------------------❤
| A. B. + C. D. |
❤-------------------❤
"""
end
end
Expand Down
Loading