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...

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question

1. pyth code please

## First Script – Decision Making

### Overview

Create a script to determine the suitable garden for planting various types of plants. Each plant has specific characteristics including a name, type (Flower, Vegetable, Tree, etc.), and a maximum height. 

### Garden Criteria

There are three distinct gardens, each with specific planting requirements:

1. **Vegetable Garden:** 
   - Accepts only Vegetables.
   - No height restriction.

2. **Low Garden:**
   - Accepts only Flowers.
   - Maximum height of 3.

3. **High Garden:**
   - Accepts only Flowers.
   - Maximum height of 6.

### Instructions

Print a single line for each plant indicating one or more gardens where it can be planted. If a plant does not meet the criteria for any garden, indicate that explicitly.

### Test Data

Use the following plants to test the script:

1. **Lily**: Type - Flower, Height - 3
2. **Bonsai**: Type - Tree, Height - 2
3. **Carrots**: Type - Vegetable, Height - 1
4. **Corn**: Type - Vegetable, Height - 8
5. **Rose**: Type - Flower, Height - 5
6. **Sunflower**: Type - Flower, Height - 8

### Example Output

```plaintext
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.
```

Repeat the above process for each test plant, using the script to determine the appropriate garden based on the type and height criteria.
Transcribed Image Text:## First Script – Decision Making ### Overview Create a script to determine the suitable garden for planting various types of plants. Each plant has specific characteristics including a name, type (Flower, Vegetable, Tree, etc.), and a maximum height. ### Garden Criteria There are three distinct gardens, each with specific planting requirements: 1. **Vegetable Garden:** - Accepts only Vegetables. - No height restriction. 2. **Low Garden:** - Accepts only Flowers. - Maximum height of 3. 3. **High Garden:** - Accepts only Flowers. - Maximum height of 6. ### Instructions Print a single line for each plant indicating one or more gardens where it can be planted. If a plant does not meet the criteria for any garden, indicate that explicitly. ### Test Data Use the following plants to test the script: 1. **Lily**: Type - Flower, Height - 3 2. **Bonsai**: Type - Tree, Height - 2 3. **Carrots**: Type - Vegetable, Height - 1 4. **Corn**: Type - Vegetable, Height - 8 5. **Rose**: Type - Flower, Height - 5 6. **Sunflower**: Type - Flower, Height - 8 ### Example Output ```plaintext 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. ``` Repeat the above process for each test plant, using the script to determine the appropriate garden based on the type and height criteria.
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education