exercism/elixir/two-fer
Danil Negrienko d46a9b8e9a two_fer 2024-03-11 11:30:10 -04:00
..
.exercism two_fer 2024-03-11 11:30:10 -04:00
lib two_fer 2024-03-11 11:30:10 -04:00
test two_fer 2024-03-11 11:30:10 -04:00
.formatter.exs two_fer 2024-03-11 11:30:10 -04:00
.gitignore two_fer 2024-03-11 11:30:10 -04:00
HELP.md two_fer 2024-03-11 11:30:10 -04:00
README.md two_fer 2024-03-11 11:30:10 -04:00
mix.exs two_fer 2024-03-11 11:30:10 -04:00

README.md

Two Fer

Welcome to Two Fer on Exercism's Elixir Track. If you need help running the tests or submitting your code, check out HELP.md.

Introduction

In some English accents, when you say "two for" quickly, it sounds like "two fer". Two-for-one is a way of saying that if you buy one, you also get one for free. So the phrase "two-fer" often implies a two-for-one offer.

Imagine a bakery that has a holiday offer where you can buy two cookies for the price of one ("two-fer one!"). You go for the offer and (very generously) decide to give the extra cookie to a friend.

Instructions

Your task is to determine what you will say as you give away the extra cookie.

If your friend likes cookies, and is named Do-yun, then you will say:

One for Do-yun, one for me.

If your friend doesn't like cookies, you give the cookie to the next person in line at the bakery. Since you don't know their name, you will say you instead.

One for you, one for me.

Here are some examples:

Name Dialogue
Alice One for Alice, one for me.
Bohdan One for Bohdan, one for me.
One for you, one for me.
Zaphod One for Zaphod, one for me.

Source

Created by

  • @Bscruz19

Contributed to by

  • @angelikatyborska
  • @Cohen-Carlisle
  • @devonestes
  • @neenjaw

Based on

https://github.com/exercism/problem-specifications/issues/757