DS Path humor

I always like to see cultural references in the learning materials.
Who’s the Tears for Fears fan that created this part of the Classes, Constructors modules? (it’s part of the updated content)

See:

class Shouter:
  def __init__(self, phrase):
    # make sure phrase is a string
    if type(phrase) == str:
 
      # then shout it out
      print(phrase.upper())
 
shout1 = Shouter("shout")
# prints "SHOUT"
 
shout2 = Shouter("shout")
# prints "SHOUT"
 
shout3 = Shouter("let it all out")
# prints "LET IT ALL OUT"

Nicely done! :joy: :clap:

8 Likes

It’s too bad the song “Mad World” couldn’t have been incorporated into the lesson. Though, I guess that might be a little depressing. :wink:

The Gary Jules version is my favorite. (Hello, Donnie Darko fans.) :rabbit:

2 Likes