Coders Packet

Capitalizing First and Last Letters of a String in Python

By VenkatNarayan.K

  • program2.py
  • newoutput.png
  • Captalize first and last letter in a string usting python.docx
  • Python Program to convert first and last letters of a string into uppercase and remaining letters to lowercase.

    A string is a sequence of characters of lowercase and uppercase. A user can type lowercase letters instead of typing uppercase letters, for such conditions we need to Capitalize those letters. Suppose a user needs to give input that has first and last letters as capital letters but the user is mistakenly given all letters as lowercase letters then this program works in converting those letters

    If a user gives "proGraMminG" as input but the proper input should be "ProgramminG" then we have to convert "p" into "P", "G" into "g", and "M" into "m" to make the input proper.

    Download Complete Code

    Comments

    No comments yet

    Download Packet

    Reviews Report

    Submitted by VenkatNarayan.K (venkat07)

    Download packets of source code on Coders Packet