"Peel away and Guess" and Python

  • Python
  • Thread starter Stephen Tashi
  • Start date
In summary, during a conversation on how to find the closed form of a recursive LTI system, a suggestion was made to add a link to notes explaining the "peel away and guess method." However, the person making the suggestion was unsure if they would be able to understand it and also mentioned not being a Python programmer. The discrepancy between the function defined and the code used was also discussed, with the suggestion that it may be a typo. The mysterious term "x[n]" was brought up, with reference to it being treated as an input in the notes. This conversation took place on a thread where the OP had not yet received a solution.
  • #1
Stephen Tashi
Science Advisor
7,861
1,600
I sent a PM to member kostoglotov suggesting he add a link to some notes containing the problem posed in his thread (https://www.physicsforums.com/threads/finding-the-closed-form-of-a-recursive-lti-system.900342/ ).

The link is:
https://ocw.mit.edu/courses/electri...tems-fall-2011/readings/MIT6_003F11_chap4.pdf

The "peel away and guess method" explained in those notes looks interesting, but it's new to me and I don't know if I'll figure it out - also I'm not a Python programmer.

I didn't post my suggestion in the thread itself because I want the thread to still show up as unanswered.
 
Technology news on Phys.org
  • #2
He defines his function as [itex]y[n] = 7y[n-1]-12y[n-2]+x[n][/itex], but in the code the equivalent line is
Code:
    memo[n] = 7*f(n-1) - 12*f(n-2)
which seems to be short a term. I haven't tried to comprehend his methodology - but has he just made a typo?
 
  • #3
Ibix said:
He defines his function as [itex]y[n] = 7y[n-1]-12y[n-2]+x[n][/itex], but in the code the equivalent line is
Code:
    memo[n] = 7*f(n-1) - 12*f(n-2)
which seems to be short a term. I haven't tried to comprehend his methodology - but has he just made a typo?

The ##x[n]## term is mysterious to me. In the chapter 2 of the course notes, it is treated as an input that enforces boundary conditions on the difference equation.
 
  • #4
I have posted in this thread. I'm puzzled why the x[n] is missing from the code, as well.
 

FAQ: "Peel away and Guess" and Python

1. What is "Peel away and Guess" and how does it relate to Python?

"Peel away and Guess" is a game that helps beginners learn the basics of Python programming. It is a fun and interactive way to practice using the language and develop problem-solving skills.

2. What is the main objective of "Peel away and Guess"?

The main objective of "Peel away and Guess" is to teach players how to use Python syntax and logic by solving puzzles. The game focuses on key concepts such as data types, functions, loops, and conditional statements.

3. Is "Peel away and Guess" suitable for all levels of Python learners?

Yes, "Peel away and Guess" is suitable for all levels of Python learners. The game has different difficulty levels that allow players to progress at their own pace. It also provides hints and explanations to help beginners understand the concepts and syntax used.

4. Can "Peel away and Guess" be used as a teaching tool in a classroom setting?

Absolutely! "Peel away and Guess" can be a great addition to a Python course or workshop. It makes learning more engaging and can help students apply the concepts they have learned in a fun and interactive way.

5. Are there any other similar games or resources like "Peel away and Guess" for learning Python?

Yes, there are other games and resources available for learning Python, such as "Python Challenge" and "CodeCombat". These games also use puzzles and challenges to teach programming concepts and are suitable for learners of all levels.

Back
Top