Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python: I have a perfectly square 30m x 30m backyard. I bought 10 trees and I want to plant them in totally random places so

Python: I have a perfectly square 30m x 30m backyard. I bought 10 trees and I want to plant them in totally random places so that it looks more natural. Im concerned that if we plant any two trees within 3m of each other, then they will have a hard time growing. Create a program that makes a 30x30 2D list, and randomly assigns positions for 10 trees. You must keep re-doing the process until no two trees are within 3 meters of each other. [50 marks] Note: use pythagorean theorem to calculate distance.image text in transcribed

For example, here is an invalid backyard This backyard is invalid because the two circled trees are 2.82 meters apart. One treba at position (1,1) and the other is at (3, 3). The distance is 1-V2) + (--(8 - 1)* + (3 - 17 - 2+2 V82.82 meters Here is a valid backyard

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

Explain the factors influencing wage and salary administration.

Answered: 1 week ago

Question

Examine various types of executive compensation plans.

Answered: 1 week ago

Question

1. What is the meaning and definition of banks ?

Answered: 1 week ago

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago

Question

5. Who should facilitate the focus group?

Answered: 1 week ago