Question: COMP 1 0 0 5 / 5 0 0 5 - Practical Test 2 Within your work area, create a PracTest 2 directory to work

COMP1005/5005- Practical Test 2
Within your work area, create a PracTest2 directory to work in.
Run a web browser in the Virtual Machine and download the code file from Blackboard/Assessments and put it in the PracTest2 directory.
Edit as needed to get it running (drawing a big green dot)
Then complete the four tasks below - one mark for each task
Using the lists provided in the code, and plt.scatterplot(), plot dots for the five days of the week, with the colour to match the fruit of the day, and add a title "The Caterpillar ate..."
Hint: you'll need a loop to go through the days/colours
Hint: use the loop index to generate the x,y positions for the dots
Plot an increasing number of dots to match the number in the count list. Use the loop indexes to calculate the position of dots.
Hint: you'll need a nested loop to index through the counts array
Plot each day separately, including all previous days in the plot and changing the title for each day - five plots in total
Hint 1: You'll need a third nested loop for the days for extra plots
Hint 2: Build a string for the updated plot title
Add annotations to each of the foods, and add in an increasingly large caterpillar, moving across from left to right with the days
Hint 1: use pltannotate("annotation", pos, fontsize=?, ha=?)
Hint 2: the caterpiliar has arrays for the positions and a list for the colours.
Use these to calculate position and multiply dotsize to grow the caterpillar
README and history
Record the history of the commands you've used: history > hist. txt Update a README file to include info on your code and images
Submission and Assessment
Ask your tutor to assess your work when complete.
All of your work should be submitted via Blackboard through the link on the Assessment page. This should be done as a single "zipped" file.
zip Practest2_ID *
End of Test
 COMP1005/5005- Practical Test 2 Within your work area, create a PracTest2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!