First Script – Decision Making Write a script that can determine where different plants can be planted. Each plant has a name, a type (Flower, Vegetable, Tree, etc.), and a maximum height. There are three gardens as follows: 1. The Vegetable Garden can have only Vegetables, and there is no maximum height. 2. The Low Garden can have only Flowers, and there is a maximum height of 3. 3. The High Garden can have only Flowers, and there is a maximum height of 6. Print ONE line that identifies the one or more gardens that a given plant can be planted in. If a plant does not match the criteria for any of the gardens, then say so. Test the script six times with the following test data: 1. Name: Lily, Type: Flower, Height 3 2. Name: Bonsai, Type: Tree, Height 2| 3. Name: Carrots, Type: Vegetable, Height 1 4. Name: Corn, Type: Vegetable, Height 8 5. Name: Rose, Type: Flower, Height 5 6. Name: Sunflower, Type: Flower, Height 8 Example output: Please enter the plant name: Lily Please enter the plant type: Flower Please enter the plant height: 3 A Lily can be planted in the Low Garden or the High Garden. and so on...

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 20PE: When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making...
icon
Related questions
icon
Concept explainers
Question

1. pyth code please

All print output should include descriptions as shown in the example output below.
First Script - Decision Making
Write a script that can determine where different plants can be planted.
Each plant has a name, a type (Flower, Vegetable, Tree, etc.), and a maximum height.
There are three gardens as follows:
1. The Vegetable Garden can have only Vegetables, and there is no maximum height.
2. The Low Garden can have only Flowers, and there is a maximum height of 3.
3. The High Garden can have only Flowers, and there is a maximum height of 6.
Print ONE line that identifies the one or more gardens that a given plant can be planted in. If a plant does not match the criteria for any of the gardens, then say so.
Test the script six times with the following test data:
1. Name: Lily, Type: Flower, Height 3
2. Name: Bonsai, Type: Tree, Height 2
3. Name: Carrots, Type: Vegetable, Height 1
4. Name: Corn, Type: Vegetable, Height 8
5. Name: Rose, Type: Flower, Height 5
6. Name: Sunflower, Type: Flower, Height 8
Example output:
Please enter the plant name: Lily.
Please enter the plant type: Flower
Please enter the plant height: 3
A Lily can be planted in the Low Garden or the High Garden.
and so on...
Transcribed Image Text:All print output should include descriptions as shown in the example output below. First Script - Decision Making Write a script that can determine where different plants can be planted. Each plant has a name, a type (Flower, Vegetable, Tree, etc.), and a maximum height. There are three gardens as follows: 1. The Vegetable Garden can have only Vegetables, and there is no maximum height. 2. The Low Garden can have only Flowers, and there is a maximum height of 3. 3. The High Garden can have only Flowers, and there is a maximum height of 6. Print ONE line that identifies the one or more gardens that a given plant can be planted in. If a plant does not match the criteria for any of the gardens, then say so. Test the script six times with the following test data: 1. Name: Lily, Type: Flower, Height 3 2. Name: Bonsai, Type: Tree, Height 2 3. Name: Carrots, Type: Vegetable, Height 1 4. Name: Corn, Type: Vegetable, Height 8 5. Name: Rose, Type: Flower, Height 5 6. Name: Sunflower, Type: Flower, Height 8 Example output: Please enter the plant name: Lily. Please enter the plant type: Flower Please enter the plant height: 3 A Lily can be planted in the Low Garden or the High Garden. and so on...
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning