Check for Mistakes in this Word Problem: flower-name
Directions: You are putting together a list of flowers in your garden based on their color. You have red roses, purple tulips, and yellow daisies. Write a function that takes in the color of a flower and returns the name of the flower.
Contract and Purpose Statement
Every contract has three parts ...;
Takes the name of the flower and returns its color
Write some examples, then circle and label what changes ...(EXAMPLE (
Write the definition, giving variable names to all your input values ...(define (
(string=? color "red")"rose"[
(string=? color "purple")"tulip"[
(string=? color "yellow")"daisy"[
else"That flower isn’t in the garden!"