+ 2

99 Bottle Correction

I need help completing this code for the song lyrics. It's almost perfect, but at the end, there is an instance of "1 bottles", which of course is incorrect grammar. Do I need to create a separate function to determine whether to use "bottle" or "bottles"? https://code.sololearn.com/WfNd6GNviYHS/#html

15th Dec 2018, 10:07 PM
chrisHartman
3 Answers
+ 2
I won't just straight up give you the answer, because I want you to understand it, but I will give hints and if you really don't know what to do, I'll show you my try. Tip: try to decide if either bottles or bottle is needed twice, once for : there are b bottle(s) and once for : there are b-1 bottle(s)
15th Dec 2018, 10:29 PM
Roel
Roel - avatar
+ 1
By altering the else if statements, I found a solution. Thank you for the reply.
18th Dec 2018, 2:13 AM
chrisHartman
+ 1
Nice, good job. By the way here is the solution I had in mind, but it does make the code a bit more complicated https://code.sololearn.com/WREwGP0J2ARv/?ref=app
18th Dec 2018, 6:22 AM
Roel
Roel - avatar