beanz Magazine

Samantha the Frog

US Department of Agriculture

Here's a fun math problem you can work out with pen and paper as well as Python.

Samantha the frog found herself at the bottom of a 30 foot deep well. Starting at the bottom, each day she jumps up three feet and remains in place until sun sets. Each night while sleeping, she slides back down two feet. How many days will it take Samantha to escape from the well?

Well, on day one she jumps up to the three meter mark. At night one she slides back down to the one meter mark. On day two she jumps from one meter up to the four meter mark, and then slides back down to the two meter mark as she sleeps. And this keeps happening over and over until and at some point we most likely lose track of, or miscalculate, the day, the night, or Samantha’s height.

However, if we make a quick sketch and start listing where the frog is each morning, maybe we can find a pattern to help out.

Morning Start Evening End
1 0 ft 3 ft 1 ft
2 1 ft 4 ft 2 ft
3 2 ft 5 ft 3 ft
4 3 ft 6 ft 4 ft
26 25 ft 28 ft 26 ft
27 26 ft 39 ft 27 ft
28 27 ft 30 ft and OUT!

By following a pattern, we see that on day 28 Samantha jumps to the 30 foot mark. We are going to assume that once she reaches the top of the well she is out and hops out, so she will not slide back down two feet that evening.

 

Become a subscriber and get access to the rest of this article. Plus all our magazine articles.

Stories also include numerous links to help parents, kids, and teachers learn more. Get access today at just $15 per year!

Subscribe Today!

Also In The June 2017 Issue

Can we measure the time and steps required for things to happen?

This Canadian experiment used a robot to explore how people respond to robots and technology.

An amazing new book turns math problems into shapes and illustrations.

This pen and paper project helps organize ideas into stories with a finite state machine.

While you can't use soap and water on your code, you can keep your code as sparkly clean as any dish or silverware.

This project explores the basics of using Google's Static Map software to display your own maps.

Most people love cookies. But these cookies are the kind that make the internet possible.

Links from the bottom of all the June 2017 articles, collected in one place for you to print, share, or bookmark.

Interesting stories about computer science, software programming, and technology for June 2017.

Software languages don't magically appear. They're created by design. First in a series.