Challenge
No
The Turtles, by whittingtonrhett
Write a program that tells you whether a name the user inputs is a Teenage Mutant Ninja Turtle. Write the code so that case doesn't matter, and the program would still work if the user types extra spaces at the beginning or end of their input.
The TMNTs are:
- Leonardo
- Michaelangelo
- Donatello
- Raphael
Some I/O:
- Name? Leonardo
- TMNT Detector
- ==== ========
- Is Leonardo a TMNT? Yes
The user types spaces before a name:
- Name? Raphael
- TMNT Detector
- ==== ========
- Is Raphael a TMNT? Yes
Mixed-case with extra spaces at the end:
- Name? doNatEllo
- TMNT Detector
- ==== ========
- Is doNatEllo a TMNT? Yes
Not a turtle:
- Name? Kieran
- TMNT Detector
- ==== ========
- Is Kieran a TMNT? No
Match the output format. Note: when your code outputs Is XXX a TMNT?
, XXX is the user's input (with maybe extra spaces and mixed case), not normalized user input.
Upload a zip of your project folder. The usual coding standards apply.
If you were logged in as a student, you could submit a solution to this exercise.
Where referenced