Question: 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 uppercase 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:
Please enter a four uppercase character string: KENT
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 nonalphabetic characters, string is shorter or longer than characters, the program
may errorout or produce wrong results. This is acceptable for this problem.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
