Write a line (or lines) of code that uses a list that has been previously defined, named word_list, along with a string value entered by the user beforehand, named find, to print out the percent of the occurrence of that word in the list. As an example, if your word_list looked like this: ['the', 'word', 'I', 'am', 'looking', 'for', 'is', 'called', 'my', 'word'] And find was the string 'word' The Example Output would look like this: 20.00% of the list is word
Write a line (or lines) of code that uses a list that has been previously defined, named word_list, along with a string value entered by the user beforehand, named find, to print out the percent of the occurrence of that word in the list.
As an example, if your word_list looked like this: ['the', 'word', 'I', 'am', 'looking', 'for', 'is', 'called', 'my', 'word']
And find was the string 'word'
The Example Output would look like this:
20.00% of the list is word
Otherwise, if your word_list looked like this: ['another', 'word', 'that', 'is', 'being', 'found', 'is', 'terracotta']
And find was the string 'looking'
That Example Output would look like this:
0.00% of the list is looking
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images