Question: (MUST BE IN PYTHON 2.7) Here is a poem by Pulitzer Prize winner Gwendolyn Brooks, saved as a string: poem = 'We real cool. We
(MUST BE IN PYTHON 2.7)
Here is a poem by Pulitzer Prize winner Gwendolyn Brooks, saved as a string:
poem = 'We real cool. We left school. We lurk late. We strike straight. We sing sin. We thin gin. We jazz june. We die soon.'
1. Print the string
2. Assign the string to a list and print the list
3. Determine the number of words in the list and print the result in sentence form
4. Write code to count the number of times the word 'We" appears in the list and print the result in sentence form
5. Calculate the percentage of times 'We' appears in the list and print the result in sentence form
Here is a poem by Pulitzer Prize winner Gwendolyn Brooks, saved as a string: poem We real cool. We left school. We lurk late. We strike straight. We sing sin. We thin gin. We jazz june. We die soon.' 1. Print the string 2. Assign the string to a list and print the list 3. Determine the number of words in the list and print the result in sentence form 4. Write code to count the number of times the word "We" appears in the list and print the result in sentence form 5. Calculate the percentage of times We' appears in the list and print the result in sentence form
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
