Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python function that gets a string as parameter and (a) adds 'ing' at the end of the given string, (b) if the given

image text in transcribed

Write a Python function that gets a string as parameter and (a) adds 'ing' at the end of the given string, (b) if the given string already ends with 'ing' then add 'ly' instead. If the length of the given string is less than 3 , it is unchanged. Note: Your solution must handle different case types (both uppercase and lowercase characters). Write Python statements that reads a string, calls the method and prints the result. Part-3: Please enter a string: test The output of the function is: testing Please enter a string: TESTING The output of the function is: TESTINGII Please enter a string: Go The output of the function is: Co

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

Students also viewed these Databases questions

Question

What is the basic activity of banks?

Answered: 1 week ago

Question

4. What action should Cherita Howard take and why?

Answered: 1 week ago