Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bottle-song exercise (resolves #401) #406

Merged
merged 3 commits into from
Nov 11, 2023

Conversation

keiravillekode
Copy link
Contributor

No description provided.

Copy link

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

@github-actions github-actions bot closed this Nov 11, 2023
@ryanplusplus ryanplusplus reopened this Nov 11, 2023
@@ -0,0 +1,17 @@
{
"authors": [],
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"authors": [],
"authors": ["keiravillekode"],

Comment on lines 10 to 22
local words = {
'one',
'two',
'three',
'four',
'five',
'six',
'seven',
'eight',
'nine',
'ten'
}
words[0] = 'no'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
local words = {
'one',
'two',
'three',
'four',
'five',
'six',
'seven',
'eight',
'nine',
'ten'
}
words[0] = 'no'
local words = {
[0] = 'no',
'one',
'two',
'three',
'four',
'five',
'six',
'seven',
'eight',
'nine',
'ten'
}

I think this will work

words[0] = 'no'

local function title_case(word)
return word:sub(1,1):upper()..word:sub(2)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return word:sub(1,1):upper()..word:sub(2)
return word:sub(1,1):upper() .. word:sub(2)

Comment on lines 3 to 5
--- Produces the lyrics to the song "Ten Green Bottles"
-- @param start_bottles The initial number of bottles on the wall
-- @param[opt=1] take_down The number of bottles that fall
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
--- Produces the lyrics to the song "Ten Green Bottles"
-- @param start_bottles The initial number of bottles on the wall
-- @param[opt=1] take_down The number of bottles that fall

I think we should omit this for consistency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Omitted

@ryanplusplus ryanplusplus merged commit be3bf4e into exercism:main Nov 11, 2023
2 checks passed
@keiravillekode keiravillekode deleted the bottle-song branch November 11, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants