Question: Write a program with a function that takes a string: if the length of a string is even, the function should add a star (*)

 Write a program with a function that takes a string: if

Write a program with a function that takes a string: if the length of a string is even, the function should add a star (*) at the beginning of a string: else, the function should add a star at the end of a string. The function, then, capitalizes all letters and returns the new string The program should let the usqz enter a string and pass it to the function. Sample outputs Enter a string watermelon the new string is *WATERMELON >>> Enter a string apple the new string isAPPLE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!