FOLLOW US!

Back To The Cookies

In the universe of Back to the Future, Dr. Brown and Marty still traveling through time but there is a big issue. Dr. Brown got addicted to a special white chocolate blueberry cupcake and the only thing he can do is eating this cupcake. They need to get back to their time before the police finds them. The time machine DeLorean now works differently and Marty doesn’t know how to make it work and how much of the plutonium is needed. Since all Dr. Brown can do is eating the cupcake, you need to help Marty.

  1. In your code, write a function that will set a new time to 26 October 1985. Then you need to calculate the difference between current date and the new date by seconds. For every day of traveling back to time, 10 grams of plutonium is needed. Calculate how much plutonium is needed with your function.
  2. The issue isn’t just solved like this. Dr. Brown still needs our help. Marty later learns that it was Biff’s plan to get Dr. Brown addicted to the cupcake. To get Dr. Brown to his normal self, Biff offers to make a deal with Marty. He needs to guess the number that the computer randomly selected in 1-99 range. For this, your code will randomly select a number. Then then through html, Marty will try to guess the number. He only has 6 chances. If he is able to guess it, the output will show that Dr. Brown is set free. Otherwise he stays as he is now.

Leave a Reply

Scroll to Top