Now You Code 2: Indigo Montoya

The Princess Bride is an adventure film from the 80's, a true cult classic. One of the many notable scenes involves a character Indigo Montoya who explains his character's motivation for revenge through the catch-phase:

"Hello. My name is Indigo Montoya. You killed my father. Prepare to die!"

You can watch the clip here: https://www.youtube.com/watch?v=YY4cnMmo9qw

Write a program in Python which asks the user to enter your name, a relative and a past-tense action. For example if you enter "Indigo Montoya", "Father" and "killed", the program will then output:

"Hello. My name is Indigo Montoya. You killed my father. Prepare to die!"

Or you could input "Mike Fudge", "Uncle" and "Tickled" to get:

"Hello. My name is Mike Fudge. You Tickled my Uncle. Prepare to die!"

Step 1: Problem Analysis

Inputs:

Outputs:

Algorithm (Steps in Program):


In [4]:
# Step 2: Write code here

Step 3: Questions

  1. What happens when you neglect the instructions and enter a past-tense action instead of a name? Does the code still run? Why?

Answer:

  1. What type of error is it when the program runs but does not handle bad input?

Answer:

  1. Is there anything you can do in code to correct this type of error? Why or why not?

Answer:

Step 4: Reflection

Reflect upon your experience completing this assignment. This should be a personal narrative, in your own voice, and cite specifics relevant to the activity as to help the grader understand how you arrived at the code you submitted. Things to consider touching upon: Elaborate on the process itself. Did your original problem analysis work as designed? How many iterations did you go through before you arrived at the solution? Where did you struggle along the way and how did you overcome it? What did you learn from completing the assignment? What do you need to work on to get better? What was most valuable and least valuable about this exercise? Do you have any suggestions for improvements?

To make a good reflection, you should journal your thoughts, questions and comments while you complete the exercise.

Keep your response to between 100 and 250 words.

--== Write Your Reflection Below Here ==--