This program print the verse of "charlie was a pidgeon" 10 times, and finishes off with a cute little surprise. THE DEATH OF CHARLIE SHALL OCCUR!

#by Christopher O'Leary
#The death of Charlie!
 
def print_charlieVerse():
    print "Charlie was a pidgeon, a pidgeon, a pidgeon."
    print "Charlie was a pidgeon, a pidgeon that flew."
    print "He flew in the morning, he flew in the night."
    print "And when he came home he was covered in"
 
n=0
while n != 10:
    print_charlieVerse()
    n=n+1
print "This song is annoying, annoying, annoying."
print "This song is annoying, that much is true."
print "It pisses me off, how about you?"
print "If one more verse happens he will not sur"
print "CHARLIE WAS A PIDGEON, A PIDGEON, A PIDGEON!"
print "CHARLIE WAS A PIDGEON, A PIDGEON I SHOT!"

Recommended Answers

All 6 Replies

One question:
Why?

maybe its just the way im compiling it but shouldnt their be a 2-5 second break between each line so people can read it rather then the program somply flashing past in 2 seconds

One question:
Why?

I always hated that song, so this program is designed to display how annoying it is and kill charlie. I don't know how to make the program rest for a few seconds.

Nice little song! This is how you make things wait for a few seconds:

# by Christopher O'Leary
# The death of Charlie!

import time

def print_charlieVerse():
    print "Charlie was a pidgeon, a pidgeon, a pidgeon."
    print "Charlie was a pidgeon, a pidgeon that flew."
    print "He flew in the morning, he flew in the night."
    print "And when he came home he was covered in ..."   # covered in what?
    print
 
n = 0
while n < 10:
    print_charlieVerse()
    n = n + 1
    time.sleep(5)  # sleep/wait 5 seconds
    
print "This song is annoying, annoying, annoying."
time.sleep(2)
print "This song is annoying, that much is true."
time.sleep(2)
print "It pisses me off, how about you?"
time.sleep(2)
print "If one more verse happens he will not sur ..."    # survive?
time.sleep(4)
print "CHARLIE WAS A PIDGEON, A PIDGEON, A PIDGEON!"
time.sleep(4)
print "CHARLIE WAS A PIDGEON, A PIDGEON I SHOT!"

# covered in what?

The word was always skipped over, the line went:
"Was covered in CHARLIE WAS A PIDGEON......... etc"
The missing word was shite.
Repeat the song ad infinitum. Thanks for the help. I hate campfire songs...

To make this song challenging you could change part of it:

def print_charlieVerse():
    print "Charlie was a pidgeon, a pidgeon, a pidgeon."
    print "Charlie was a pidgeon, a pidgeon that flew."
    print "He flew in the morning, he flew in the night."
    print "And when he came home he was covered in str3"   # covered in what?
    print

Where str3 rhymes with night and comes at random from a list of words.
Or, more involved:

def print_charlieVerse():
    print "Charlie was a pidgeon, a pidgeon, a pidgeon."
    print "Charlie was a pidgeon, a pidgeon that flew."
    print "He flew in the str1, he flew in the str2."
    print "And when he came home he was covered in str3"   # covered in what?
    print

Where str1 and str2 make sense and str3 rhymes with str2. You could also replace "flew", and be really annoying!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.