Snow Poem Algorithm

The following algorithm is inspired by a poem by Brian Bilston called “snow poem”. On this poem, each word represents a snowflake gently and randomly falling from the sky. On the last verse of this poem, you can see how the snow is starting to settle on the ground!

The aim of this challenge is to investigate a range of string manipulation techniques using Python including:
Splitting a string into a list, using a special character (e.g. space or “/” character)
String concatenation techniques using the * and + operators
Retrieving the length of a string using the len() function.

Here is the Python code for our Snow Poem algorithm:

Christmas Tree

Using a similar approach, we created an algorithm to reproduce the poem “Needles” by the same author.

Here is the Python code for the poem “Needles”:

There is no coding task attached to this algorithm. If you like this code, you may want to investigate the following challenges:

Did you like this challenge?

Click on a star to rate it!

Average rating 4.2 / 5. Vote count: 26

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!