In: Computer Science
Create a python program that will ask the user for his job title and print out the first letter, the last letter and the total number of letters in his job
Code: (Removing spaces)
job = input("Enter you job title: ").replace(" ", "")
print("First letter: ",job[0])
print("Last letter: ",job[-1])
print("Total number of letters: ", len(job))
Code in image:
Output:
Code:(Without removing spaces)
job = input("Enter your job title: ")
print("First letter is: ",job[0])
print("Last letter is : ",job[-1])
print("Total number of letters: ", len(job))
Code in image: (Without removing spaces)
Output: