Using dale_chall_words, define a function percent_difficult_words that given a text input will calculate the percent difficult words, using the following approach: Return the percent of words in a given text input that are not in dale_chall_words['easy_words'].
1f) Percent Difficult Words
Using dale_chall_words, define a function percent_difficult_words that given a text input will calculate the percent difficult words, using the following approach: Return the percent of words in a given text input that are not in dale_chall_words['easy_words'].
Note that a "word" is defined by being separated from other text by a space.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
You are creating a simple RPG video game, and you need to work out some details for your crafting menu. Your characters can craft two potions with simple ingredients: Minor Mana, and Minor Healing. The two potions have similar ingredients with some slight differences shown below.
You want to add a "Craft All Potions" option, which will ask the user if they would like to prioritize Healing or Mana potions. It will then tell you how many you can produce of your priority potion, and then with the leftovers it will craft the other type of potion if it is possible. First ask for the priority potion, and then the quantities of the ingredients as an input. Then output how many of the priority potion you can make, and how many of the other potion. If the user provides an invalid input, ask them again.