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

  • Context: Python 
  • Thread starter Thread starter OrbitalPower
  • Start date Start date
  • Tags Tags
    Book Error Python
Click For Summary

Discussion Overview

The discussion centers around a math problem presented in a Python programming book, specifically regarding the interpretation of a statement about an alien with multiple heads. The problem involves determining the total number of heads after a specified growth condition is applied. The scope includes conceptual reasoning and mathematical interpretation.

Discussion Character

  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant interprets the problem as calculating the total heads using the formula (3 * 2) + 1, suggesting that the alien starts with 3 heads and grows 1 more than double that amount.
  • Another participant proposes a different calculation: 3 + (3 * 2 + 1) = 10, indicating a different understanding of the growth condition.
  • A subsequent reply acknowledges a misunderstanding of the phrasing, suggesting that the phrase "grows 1 more than double his total number of heads" was misinterpreted and clarifies that it should be understood as "grows 1 more then doubles his total number of heads."
  • Another participant notes that the phrasing of the problem is awkward and may contribute to confusion.

Areas of Agreement / Disagreement

Participants express differing interpretations of the problem, with no consensus reached on the correct approach to the calculation. The discussion remains unresolved regarding the intended meaning of the phrasing and the resulting calculations.

Contextual Notes

The discussion highlights potential ambiguities in the problem's wording, which may lead to different interpretations and calculations. The specific context of the problem being presented in a console window rather than in the source code may also affect understanding.

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
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.
 
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).
 
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.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K