Exercise Answer | Learn Enough to Be Dangerous
You have to make a choice. Choose...wisely.

Get occasional notifications about things like product discounts, blog posts, and new or updated tutorials. Unsubscribe at any time.

Gift Delivery Options
Quick Checkout
or Pay by Credit Card
Error processing your payment
  • You didn't choose whether or not to be added to the mailing list
Confirm
$0.00

Payments and credit card details are securely managed and protected by Learn Enough's payment processor, Stripe. More information on their site:

CART
Total
$0.00

Your Cart is Empty

$30
$300
$300
$XY
$XY
1234

Learn Enough Ruby to Be Dangerous

Answer for Section 5.4.2 Exercises
  • Use the downto method to print out the strings "99 bottles of beer on the wall" down to "1 bottle of beer on the wall". (Take care to get the \( n=1 \) case right, so that "bottle" is singular.)
  • Answer by patrickroxas

    Join the Mailing List

    Get occasional notifications about things like product discounts, blog posts, and new or updated tutorials. Unsubscribe at any time.