Question: PYTHON. Need a simple python for the following question(s). tion 12 (20 points) rdis divergent if it begins and ends with the same letter of

 PYTHON. Need a simple python for the following question(s). tion 12

PYTHON. Need a simple python for the following question(s).

tion 12 (20 points) rdis divergent if it begins and ends with the same letter of the alphabet. For area' is divergent, but the word 'land' is not. Write a functi divergent and how many are not. Input: The functio strings A wor on named getDivergent that example, the word computes and returns how many words in a list n getDivergent takes a single parameter, words, that is a list of non-empty. Output: The function getDivergent should return a pair of integers in the form of a tuple nt words in the number of divergent words in words and the second being the number of non-diw words For example, the following would be correct output >>> advice ['the', 'secret', better 'to', 'a', 'better', 'health', 's', 'exercise'] , p>> print(getDivergent (advice) (3, 5) Question 13 (20 points) Write a function named printlines. The function printlines should: takes one parameter: a string named line prompt the user for an item of input: the number of times to print Line produce two kinds of output. It should: . 1. 2. print out Line the desired number of times return the total number of lines it printed For example, the following would be correct input and output: Number of repetitions? 3 >>> print (count) parameters, not al o

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!