Question: Create a functioWrite a function named formAdverb ( s ) that accepts an adjective string s , then forms an adverb from the adjective, and

Create a functioWrite a function named formAdverb(s) that accepts an adjective string s, then forms an adverb from the adjective, and returns the adverb. Call and display your function with testing case (25 pts). In most cases, an adverb is formed by adding '-ly' to an adjective. For example, 'quick' -> 'quickly' If the adjective ends in '-y', replace the 'y' with 'i' and add '-ly'. For example, 'easy' -> 'easily' If the adjective ends in '-able', '-ible', or '-le', replace the '-e' with '-y'. For example, 'gentle' -> 'gently' If the adjective ends in '-ic', add '-ally'. For example, 'basic' -> 'basically'.n called avgNum(lst) that takes a non-empty list, lst, as input. The function should calculate and return the average of all the numbers in the list. If any element in the list is a string representing a number, convert it to the appropriate numeric data type. Test the function with a given case and display the result. (25 pts) Test case: print(avgNum([10,'20','30',20]))

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 Programming Questions!