Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python program that would do the following: 1) Prompt the user to enter a string. 2) The program should print the entered string

Write a Python program that would do the following:

1) Prompt the user to enter a string.

2) The program should print the entered string in all lower case letters on the first line.

3) The program should print the entered string in all upper case letters on the second line.

4) The program should extract the first and last characters from the entered string and print the extracted characters in both upper and lower case letters separated by three hyphens (-)  as shown below on the third line. 

5) The program should find and print the length of the entered string on the fourth line.

For example, if the user enters the string  Welcome to HCC  , then the program should produce the following output:

welcome to hcc

WELCOME TO HCC

W---w---C---c

String length: 14

Step by Step Solution

3.53 Rating (150 Votes )

There are 3 Steps involved in it

Step: 1

This is a complete question and its about writing a Python program which processes strings Here is ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

More Books

Students also viewed these Programming questions

Question

Define decision model.

Answered: 1 week ago

Question

Tell me about yourself.

Answered: 1 week ago