Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.26 KB

File metadata and controls

36 lines (26 loc) · 1.26 KB

String Methods Assignment

Instructions

Open my_code.py and write a program that prompts the user for an input of your choice. The program should then determine the first and last letters typed by the user, convert them to uppercase and print them on two lines (using 1 print statement).

Steps to take

  • Prompt user for input
  • Determine first and last letters (spaces don't count!)
  • Capitalize the letters (can be done before or inside print statement)
  • Print the letters in brief messages on separate lines, using a single print statement
  • In another print statement, write a message using the user's input, but replacing a character with another.

Example

Input:

python

Output:

The first letter you entered was P.
The last letter you entered was N.
I think you meant to type pychon!

Submission instructions

  • Test your program with multiple inputs, including starting and ending with spaces to be sure it functions correctly.
  • When you are satisfied, commit and push to GitHub.
  • Check the Feedback (in Pull Requests) for style errors and correct them as needed.

Attribution:

Thank you to Bianca Ruiz @RuiztheRuler for providing a great starting place for automating feedback!