Python exercise: please provide me with the codes. 2-4. Name Cases: Store a person’s name in a variable, and then print

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Python exercise: please provide me with the codes. 2-4. Name Cases: Store a person’s name in a variable, and then print

Post by answerhappygod »

Python exercise: please provide me with the codes.
2-4. Name Cases: Store a person’s name in a variable, and then print that per- son’s name in lowercase, uppercase, and titlecase .
2-5. Famous Quote: Find a quote from a famous person you admire . Print the quote and the name of its author . Your output should look something like the following, including the quotation marks:
Albert Einstein once said, “A person who never made a mistake never tried anything new.”
2-6. Famous Quote 2: Repeat Exercise 2-5, but this time store the famous per- son’s name in a variable called famous_person . Then compose your message and store it in a new variable called message . Print your message .
2-7. Stripping Names: Store a person’s name, and include some whitespace characters at the beginning and end of the name . Make sure you use each character combination, "\t" and "\n", at least once .
Print the name once, so the whitespace around the name is displayed . Then print the name using each of the three stripping functions, lstrip(),rstrip(), and strip() .
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply