WebR Charlie Data Example

Exercises

Combine Functions to Answer Questions

Use a combination of these functions to answer the following questions. Think through what variables you want to use and make sure you can justify why. There aren’t necessarily correct answers to every question because Charlie and I might have conflicting interests. Also remember to add comments to your code to tell you what it does.

Remember you can always just run the variable object name to see the data you are working with.

Which flavor is cheapest on average?

I know Charlie likes fish and cheese, but excluding those, what treats does Charlie like best?

If I want to distract Charlie for a while, what is the best type of treat to buy?

How much money is wasted if Charlie only eats 80% of the treats he doesn’t finish?

Which treats are the best every day treat? Which treats are the best to buy occasionally?

What brand should I look for if I’m getting something new?