Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

It is Halloween and you plan to go trick-or-treating. You'd like to fill your bag to the brim with candy, but there might not be

image text in transcribed
It is Halloween and you plan to go trick-or-treating. You'd like to fill your bag to the brim with candy, but there might not be enough time or houses in your neighborhood to ill t up all the way Write a code that determines whether you are able to fill your candy bag up completely before the night ends. If you are successful, display the message "Look at all that candy", but if you aren't then display the message "Trick-or-Treating is lamel" You plan to start trick-or-treating at 6 PM, and you want to finish by 10 PM so you can eat your candy while watching the movie Hocus Pocus. However, you also plan to take an hour break at 8 PM to TP your math professor's house. If you are able to fill your bag before 10 PM, you will end the evening early. (Instead of stopping at 10 PM, you will stop at whatever time it currently is.) There are 115 houses in your neighborhood, and you are able to visit 4 houses every 10 minutes. f the houses in your neighborhood, there is a 10% chance that the owners are not home to give you candy. For the people that are home, there is a 20% chance that they will say you're too old to be trick-or-treating, and refuse to give you any candy. However, for neighbors willing to give you candy, there is a 20% chance they'll be afraid of you TPinR their house, and give you 3 candies instead of 1. Your candy bag is cylindrical in shape, with a 10 inch diameter, and an 18 inch height. Each time you receive a candy, there is an equal chance it could be 1 of 3 shapes: rectangular (2 inch width x 1 inch height x 4 in length), spherical (2.5 in diameter), or cylindrical (2.5 inch diameter x 3 inch height). Do not consider packing densities when placing candies in the candy bag

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

3. What changes should I be making?

Answered: 1 week ago

Question

2. Why?

Answered: 1 week ago