× Didn't find what you were looking for? Ask a question
Top Posters
Since Sunday
e
4
h
4
h
4
m
3
d
3
B
3
o
3
w
3
H
3
a
3
c
3
k
3
New Topic  
Anonymous joshephn
wrote...
A week ago
implement a function in python code from the following parameters and context.

Function: create_hexagonal_layout(number_of_rows, number_of_columns, minimum_gap_between_turbines). This cannot cha

Parameters:
- number_of_rows is an integer number that specifies how many turbines there are in each column
- number_of_columns is an integer number that specifies how many equally spaced columns of turbines to create (you may assume that there are an even number of columns)
- minimum_gap_between_turbines is the minimum gap (measured in metres) between all turbines
Return value:
- a list of (x,y) tuples corresponding to the x and y coordinates of each of the turbines.

Context: The following function (which you need to implement) creates one of these hexagonal layouts, with the specified number of rows and columns and minimum distance between turbines. You may assume that there are an even number of columns.

As with the grid layout, the first turbine is always at location (0,0), followed by the other turbines in the first column, then the turbines in the next column and so on.

Needs to have more than two loops.


Read 57 times

Related Topics

New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1052 People Browsing
Related Images
  
 206
  
 64
  
 288