Programming Poetry

# you can make functions with def in python
# this function is named makeVerseOne
# it has one parameter, named 'what'
# the function outpus a a verse with {0} replaced with the parameter 'what'
def makeVerseOne(what):
  return "Once, {0} were sparsely connected".format(what)
  
  
# this does the same thing but with a different verse
def makeVerseTwo(became):
  return " then they {0}.".format(became)
  
# this is a list of things my poem is about  
whatWas = [
  "atoms",
  "molecules",
  "proteins",
  "cells",
  "people",
  "societies and countries",
  "technologies",
  "people"
]


# this is an empty list. I want to STORE my verses here.
verses = []

# we commonly fill lists with values returned from functions
for what in whatWas :
  verses.append(makeVerseOne(what))
  verses.append(makeVerseTwo("connected"))
  
# remove last line, for edginess
verses.pop()
  
# lets combine all the verses with a newline after each verse
poem = "\n".join(verses)

# output the poem to the terminal
print(poem)