Error in python book?

  • Python
  • Thread starter OrbitalPower
  • Start date
  • #1
OrbitalPower

Main Question or Discussion Point

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?
 

Answers and Replies

  • #2
CRGreathouse
Science Advisor
Homework Helper
2,820
0
"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
OrbitalPower
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
283
0
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.
 

Related Threads on Error in python book?

  • Last Post
Replies
7
Views
881
  • Last Post
Replies
9
Views
3K
Replies
4
Views
835
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
8
Views
3K
Replies
5
Views
4K
  • Last Post
Replies
2
Views
2K
Replies
27
Views
2K
Replies
5
Views
896
Replies
2
Views
9K
Top