In this lab, you complete a partially written Python program that includes built-in methods that convert Strings to all uppercase or all lowercase. The program prompts the user to enter any string. To end the program, the user can enter "done". For each string entered, call the built in methods lower() and upper(). The program should call these methods using a string object, followed by a dot (.), followed by the name of the method. Both of these methods return a string with the string changed to uppercase or lowercase. Here is an example: sample = "This is a String." result = sample.lower(); result = sample.upper(); The source code file provided for this lab includes the necessary input and output statements. Comments are included in the file to help you write the remainder of the program.
In this lab, you complete a partially written Python
The program prompts the user to enter any string. To end the program, the user can enter "done". For each string entered, call the built in methods lower() and upper(). The program should call these methods using a string object, followed by a dot (.), followed by the name of the method. Both of these methods return a string with the string changed to uppercase or lowercase. Here is an example:
sample = "This is a String."
result = sample.lower();
result = sample.upper();
The source code file provided for this lab includes the necessary input and output statements. Comments are included in the file to help you write the remainder of the program.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images