You will be required to have your program take input from the user for how many bottles of soda will be required and print the song out with the correct number of bottles reflected. The printed version must look like the following:

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
"99 Bottles of Beer" is a traditional song for long car trips for many generations.
We will modify the song to reflect soda and have varied numbers of bottles for
the ride. We need a program that will allow the user to modify the song to either
be long, all 99 bottles of Soda, or short, 1-98 bottles of soda.
Transcribed Image Text:"99 Bottles of Beer" is a traditional song for long car trips for many generations. We will modify the song to reflect soda and have varied numbers of bottles for the ride. We need a program that will allow the user to modify the song to either be long, all 99 bottles of Soda, or short, 1-98 bottles of soda.
You will be required to have your program take input from the user for how
many bottles of soda will be required and print the song out with the correct
number of bottles reflected.
The printed version must look like the following:
99 bottles of soda on the wall!
99 bottles of soda!
Take one down
And pass it around
98 bottles of soda on the wall!
1 bottle of soda on the wall!
1 bottle of soda!
Take on down
And pass it around
1 bottle of beer on the wall!
Note:
The song must print exactly as above with newlines between each verse and
double newline between each decremented stanza.
the last two verses must change from plural “bottles" to “"bottle" and the last must
be “No more bottles of soda".
The program must start by asking the user how many bottles they want and the
song must start from that number.
If the user gives no number, the program must start with 99.
if the user gives more than 99 or less than 1, the program must not error and must
prompt the user to fix their mistake.
If the user types a string instead of an integer, the program must no error and
must ask the user to fix their mistake.
Transcribed Image Text:You will be required to have your program take input from the user for how many bottles of soda will be required and print the song out with the correct number of bottles reflected. The printed version must look like the following: 99 bottles of soda on the wall! 99 bottles of soda! Take one down And pass it around 98 bottles of soda on the wall! 1 bottle of soda on the wall! 1 bottle of soda! Take on down And pass it around 1 bottle of beer on the wall! Note: The song must print exactly as above with newlines between each verse and double newline between each decremented stanza. the last two verses must change from plural “bottles" to “"bottle" and the last must be “No more bottles of soda". The program must start by asking the user how many bottles they want and the song must start from that number. If the user gives no number, the program must start with 99. if the user gives more than 99 or less than 1, the program must not error and must prompt the user to fix their mistake. If the user types a string instead of an integer, the program must no error and must ask the user to fix their mistake.
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY