Answered step by step
Verified Expert Solution
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started