Skip to content

Athenian-Computer-Science/string-methods-assignment-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages