Python Book Error: Solving a Math Problem with Aliens and Multiple Heads

In summary, the conversation is about finding the correct formula for determining the number of heads an alien has if it starts with 3 heads, grows 1 more than double its total number of heads, and repeats this pattern. The correct formula is 3 + (3*2 + 1) = 10, as pointed out by the expert. There was confusion about the wording of the problem, but ultimately the expert's formula was confirmed to be correct.
  • #1
OrbitalPower
In python for the absolute beginner, we have this (page 28):

"If an alien has 3 heads, grows 1 more than double his total number of
heads, how many heads does the alien have?"

My formula is: (3 * 2) + 1

(For example, in this sequence, each sequential number is one more than double the next one: 2, 5, 11, 23, 47.)

but he gives (3 + 1) * 2 = 8. But he says one more than double his (current) total. So that seems incorrect.

Who is right?
 
Technology news on Phys.org
  • #2
OrbitalPower said:
"If an alien has 3 heads, grows 1 more than double his total number of heads, how many heads does the alien have?"

I would have thought

3 + (3*2 + 1) = 10

heads.
 
  • #3
Yes. That's right. The error was my own. It says "if an alien has 3 heads, grows 1 more THEN doubleS his total number of heads, how many heads does the alien have."

In fairness, I couldn't really see. That part of the program is only in the console window, not in the source code he gives (for some reason).
 
  • #4
Maybe it's meant to say:
"If an alien has 3 heads, grows 1 more then doubles his total number of heads, how many heads does the alien have?"

It's awkwardly-phrased as it is.
 

1. What is the premise of the book?

The book follows a group of aliens with multiple heads who are trying to solve a math problem. They encounter errors along the way and must use their problem-solving skills to overcome them.

2. Is this book suitable for children?

Yes, the book is suitable for children as it teaches problem-solving skills in a fun and imaginative way. It also introduces basic math concepts in an engaging manner.

3. What age range is this book recommended for?

This book is recommended for children aged 6-10 years old. However, children of all ages can enjoy the story and learn from it.

4. Are there any educational resources that accompany the book?

Yes, there is a companion website that provides additional resources such as math worksheets, interactive activities, and games to further reinforce the concepts presented in the book.

5. Can this book be used in a classroom setting?

Absolutely! This book can be used as a supplemental resource in a math or science classroom to engage students in creative problem-solving and critical thinking.

Similar threads

  • Programming and Computer Science
Replies
10
Views
2K
  • Programming and Computer Science
Replies
2
Views
905
  • Programming and Computer Science
Replies
3
Views
307
  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
4
Views
4K
  • Programming and Computer Science
Replies
1
Views
2K
  • Programming and Computer Science
Replies
3
Views
919
  • Programming and Computer Science
Replies
1
Views
667
  • Programming and Computer Science
Replies
6
Views
3K
  • Programming and Computer Science
Replies
2
Views
2K
Back
Top