Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN NETLOGO Suppose you have a world with just two important rules: 1. No two turtles may have the same pxcor or the same pycor.

IN NETLOGOimage text in transcribed

Suppose you have a world with just two important rules: 1. No two turtles may have the same pxcor or the same pycor. (Remember that pxcor and pycor are the coordinates of the patch that a turtle is on, and they are always integers.) 2. The world is square. (That is, the width is the same as the height.) You may assume your world is square (i.e. that the settings are set for a square world). It should not matter the size of the world, or whether wrapping is turned on and off. You may only assume that the world is square. Write a procedure that places turtles on patches randomly but guarantees that Rule 1 is preserved. (For up to 8 points): Make this work creating a number of turtles that is one less than the width of the world. For example, in the default world that is 3333 patches, you would create and place 32 turtles in the procedure. After calling , the value of count turtles with should be no more than 1 for any value of x, and ] should be no more than 1 for any value of y. (For the full 10 points): Make this work creating a number of turtles is the same as the width of the world. For example, in the default world that is 3333 patches, you would create and place 33 turtles in the procedure. After calling setup, count turtles with should be exactly 1 for all x from to , and count turtles with should be exactly 1 for all y from to

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

User Defined Tensor Data Analysis

Authors: Bin Dong ,Kesheng Wu ,Suren Byna

1st Edition

3030707490, 978-3030707491

More Books

Students also viewed these Databases questions

Question

explain the need for human resource strategies in organisations

Answered: 1 week ago

Question

describe the stages involved in human resource planning

Answered: 1 week ago