subject

Write a program birthday_candles. py that computes how many boxes of candles a person needs to buy each year for his birthday cake. You can assume that the person reaches an age of 100, the number of candles used each year is the same as the age, that you save non-used candles from one year to another, and that each box contains 24 candles. Also, at the end, we want you to print the total number of boxes one has to buy, and how many candles that are available after having celebrated the 100th birthday. An example of an execution: Before birthday 1, buy 1 box(es)
Before birthday 7, buy 1 box(es)
Before birthday 10, buy 1 box(es)
Before birthday 12, buy 1 box(es)
Before birthday 14, buy 1 box(es)

...

Before birthday 95, buy 3 box(es)
Before birthday 96, buy 4 box(es)
Before birthday 97, buy 5 box(es)
Before birthday 98, buy 4 box(es)
Before birthday 99, buy 4 box(es)
Before birthday 100, buy 4 box(es)

Total number of boxes: 211, Remaining candles: 14

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Match the following. 1. show grouping of word processing tasks that can be performed quick access toolbar 2. shortcut location for commonly used elements scroll bars 3. organized commands used to modify documents ribbon 4. used to align and measure content in a word screen zoom bar 5. vertical and horizontal bars that are used to navigate through a document contextual tabs 6. displays the name of the document in use ruler 7. allows users to enlarge or shrink a visual of a word document title bar
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
question
Computers and Technology, 25.06.2019 03:00
What judgment would you make about open systems interconnect? not useful that it is a technology that it is a model that it does not pertain to technology
Answers: 1
question
Computers and Technology, 25.06.2019 16:00
Which domain suffixes do businesses that sell products and services commonly use?
Answers: 2
You know the right answer?
Write a program birthday_candles. py that computes how many boxes of candles a person needs to buy e...
Questions
question
Social Studies, 09.12.2021 03:10
question
English, 09.12.2021 03:10
Questions on the website: 13722362