Write a program for a library to manage books. 1. Create a dictionary with 10 books...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program for a library to manage books. 1. Create a dictionary with 10 books a. Book dictionary should contain the following 2 values 1. Number of books available 2. Age limit to read the book I.e. "The Jungle Book" [10, 25] b. Write a while loop to run this program again and again 2. Ask the user what book they would like to read. 3. Check if the book is available. Note: add a condition in your program to update the number of books available in the dictionary i.e.: let's say the number of books available = is 25 and every time the user used that book, it should update to 25-1 if the book value is 0, this means the book is unavailable 4. if the book is available, get the user's age. Note: add a condition to match the age in the dictionary and the user-provided age. a. if age is passed, print a message "enjoy the book" b. if age is not passed, print a message "Your age limit is not permitted to read this try something else" c. if the book is not available print a message "sorry {book name} is not available, please try again." Write a program for a library to manage books. 1. Create a dictionary with 10 books a. Book dictionary should contain the following 2 values 1. Number of books available 2. Age limit to read the book I.e. "The Jungle Book" [10, 25] b. Write a while loop to run this program again and again 2. Ask the user what book they would like to read. 3. Check if the book is available. Note: add a condition in your program to update the number of books available in the dictionary i.e.: let's say the number of books available = is 25 and every time the user used that book, it should update to 25-1 if the book value is 0, this means the book is unavailable 4. if the book is available, get the user's age. Note: add a condition to match the age in the dictionary and the user-provided age. a. if age is passed, print a message "enjoy the book" b. if age is not passed, print a message "Your age limit is not permitted to read this try something else" c. if the book is not available print a message "sorry {book name} is not available, please try again."
Expert Answer:
Answer rating: 100% (QA)
Answer Heres a Python program that should accomplish this Creating a dictionary with 10 books The ke... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Beale Management has a noncontributory, defined benefit pension plan. On December 31, 2024 (the end of Beale's fiscal year), the following pension-related data were available: Projected Benefit...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
discuss the role of the cytoplasm in cellular defense mechanisms, including the assembly of stress granules, the unfolded protein response, and autophagy, in response to various internal and external...
-
The common stock of Scarlet Enterprises currently pays a quarterly dividend of $1.75 per share. The dividend is assumed to grow annually at a constant rate of 4.0%. The market beta for Scarlet...
-
The system of three identical 10-kg blocks is supported in a vertical plane and is initially at rest. Neglecting the masses of the pulleys and the effect of friction in the pulleys, determine(a) The...
-
In which namespace do we keep our graphics interface classes (our graphics library)?
-
What are the advantages and disadvantages of e-learning?
-
Float and Weighted Average Delay your neighbor goes to the post office once a month and picks up two checks, one for $13,000 and one for $4,000. The larger check takes four days to clear after it is...
-
Monie Love Inc. began operations in January 2 0 2 0 and had the following reported net income or loss for each of its 5 years of operations: 2 0 2 0 $ 2 2 5 , 0 0 0 loss 2 0 2 1 $ 1 4 0 , 0 0 0 loss...
-
Beverly and Ken Hair have been married for 3 years. Beverly works as an accountant at Cypress Corporation. Ken is a full-time student at Southwest Missouri State University (SMSU) and also works...
-
The Tempe Terrapins had the rights to the first pick in the National Hockey League draft, so Opportunist contacted them to see if they were interested in Attackman. The Terrapins were very interested...
-
In 2025, the IRS issues a regulation providing that all corporations must file an additional tax form that specifically states how much the corporation has invested in crypto-currencies. In 2027, the...
-
Describe the significance that self-directed learning, transformative learning, and experiential learning have had on the field of adult learning. Describe a transformative learning experience that...
-
Discuss why consumers prefer to shop online. How has the pandemic affected consumer shopping patterns? Integrate Biblical passages into your discussion.
-
What is the importance of a Job Analysis and who is responsible for this process. Discuss.
-
Design and describe a recruiting campaign to attract more women and visible-minority applicants to the RCMP
-
23. In which two market models would advertising (imaginaryproduct differentiation) be used most often? A) pure competition and monopolistic competition C) monopolistic competition and oligopoly B)...
-
Access the Federation of Tax Administrators Internet site at www. taxadmin.org/state-tax-forms and indicate the titles of the following state tax forms and publications: a. Minnesota Form M-100 b....
-
Indicate, in each of the following situations, the number of exemptions the taxpayers are entitled to claim on their 2012 income tax returns. Number of Exemptions a. Donna, a 20-year-old single...
-
Abigail (Abby) Boxer is a single mother working as a civilian accountant for the U.S. Army. Her Social Security number is 676-73-3311 and she lives at 3456 Alamo Way, San Antonio, TX 78249. Helen,...
-
Kathy Kennedy (age 44) is a single taxpayer and she lives at 212 North Pine Way, Payson, AZ 85541. Her Social Security number is 467-98-9784. Kathy's earnings and income tax withholding as the...
-
Graph the discrete probability distribution given in Table 1 from Example 2. Approach In the graph of a discrete probability distribution, the horizontal axis represents the values of the discrete...
-
Compute the mean of the discrete random variable given in Table 1 from Example 2. Approach Find the mean of a discrete random variable by multiplying each value of the random variable by its...
-
Which of the following is a discrete probability distribution? Approach In a discrete probability distribution, the sum of the probabilities must equal 1, and all probabilities must be between 0 and...
Study smarter with the SolutionInn App