Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

(3) Handling user input  (3 points)

...

User input with the input function. 

Copy the name program from above to "name_input.py".  Rather than use a string defined in the program, this version should request the user's name, and then print the output for the name that is given.  Hint:  use the built-in "input" function.  Make sure that your program works for names with up to 4 sub-names.  Think about what input validation is necessary so that your program won't crash if a user gives poor input?   Implement error handling with the "try/except" technique discussed in class.  

...