Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a PYTHON PROGRAM which - > prompts the user for a 4 upper - case letters word - > prints the same word all

Write a PYTHON PROGRAM which
-> prompts the user for a 4 upper-case letters word
-> prints the same word all in lower case
You have to implement the following algorithm:
->Convert the characters to their ASCII equivalent integer
->Add or subtract the necessary number to get the ASCII number of the corresponding lower case letter
->Convert the integers back to characters.
->Put together the lower case letters to obtain the word
->Print the result strictly following the sample below:
1 Please enter a four upper-case character string: KENT
2 The string in lower case is 'kent'.
Important Note:
There exists functions to convert letter cases. DO NOT use them at this stage. We will introduce them later on in the course and use
them for other problems.
General Note:
At least one provided test compares prompts and output for an exact match, including spacing and punctuation
When the user enters invalid input (string contains non-alphabetic characters, string is shorter or longer than 4 characters, ...) the program
may error-out or produce wrong results. This is acceptable for this problem.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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_2

Step: 3

blur-text-image_3

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

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

What are the basic financial decisions ?

Answered: 1 week ago

Question

What is meant by 'Wealth Maximization ' ?

Answered: 1 week ago