Random Cloud Generator using Python

cloudCan computers produce artwork? In this challenge we are looking at how to write a piece of code to generate a “pretty” graphic.

Our first script will generate a random cloud on a blue sky by drawing several (15 in total) white circles of different sizes and position on the canvas. It uses the randomize library to randomly alter the size and position of these circles.

Your Challenge


Use a similar script to generate a random forest as follows:

forest

Extended Challenge


How could you change your script so that each tree has a different shade of green:

forest2

Share Button
Posted in Computer Science, Python - Advanced, Python Challenges Tagged with: ,
0 comments on “Random Cloud Generator using Python
1 Pings/Trackbacks for "Random Cloud Generator using Python"
  1. […] Random Cloud Generator using Python | 101 Computing […]

Our Latest Book

Follow this blog