

This exercise is meant for you to spend time thinking about how complex loops work and how to modify and adjust code for different purposes. In the cell below, pseudo-code is provided to help guide you in constructing your first loop of a loop! Remember, you can almost use the previous code (with some modifications) for your loop to calculate x and y coordinate values and to plot your sunflower in the loop of loops below. Use this for your outer loop to minutely adjust the angle value from +- 1 degree of the golden angle! linspace() takes a start value (inclusive), stop value (inclusive), and a number of steps to incrementally iterate over the interval. How do you specify a set number of steps between two values? One function to do this is linspace(), from the numpy module. We will be iterating in 100 steps from -1 to +1 degrees of the golden angle. The outer loop repeats with a new angle value and a new frame of the animation!

Your previous code to plot a sunflower plots the florets for the current angle, The inner loop is exited, you are back in the outer loop, Inner loop caclulates all the x and y coordinate values for the new angle value, You put that loop into another loop! The outer loop will iterate over deviations of the golden angle. Our strategy will be to create a loop within a loop! The logic is this: you have already created a loop that will calculate all the x & y coordinates in a sunflower. Using this animation, you will observe the sensitivity of the packing of florets in a sunflower to the golden angle, and how this sensitivity varies closer to and farther from the center. In this exercise, you will be taking the sunflower florets you just created using your for loop and creating an animation, where the value of the golden angle deviates from -1 to +1 degrees over 100 steps. This is because of the special mathematical properties of the golden angle. A little bit more or less and the beautifully-spaced arrangement that is readily apparent to the eye is destroyed. You learned in the The Algorithmic Beauty of Plants chapter that you read that the packing of florets in a sunflower is extremely sensitive to the exact value of the golden angle. Practice: Variant discovery, genetic diversity, and population genetics Practice: Introduction to gene expression (RNAseq) analysis Practice: Genome visualization and comparative genomicsġ0.0 A short introduction to short read analysis Lesson 8.6 Using the high performance computing cluster (HPCC) at MSUĩ.0 Genome visualization and comparative genomics MINERIA DE DATOS EN LA LINEA DE COMANDOS DE UNIXĨ.0 Introduction to plant genomics and working with sequences in Python Instalar Anaconda y usar Jupyter notebooksĦ. Installing Anaconda and using Jupyter notebooksġ. Welcome : to Plants & a Plants & Pythonġ.
