Last active
March 15, 2017 17:51
-
-
Save sallyom/7edccd49faec535e5a5ea900b61bc062 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make a list of adjectives | |
adj = ['cool', 'not cool'] | |
while True: | |
n1 = input('Give me a number:\n') | |
n2 = input('Give me another number:\n') | |
# Make MadLibs-y sentences | |
print('Hi, %s person. Something %s will happen today.\n\n' % (adj[int(n1) % len(adj)], adj[int(n2) % len(adj)] )) | |
OR | |
import string | |
# Ask the user for input | |
adjective1 = input("Give me an adjective! ") | |
noun1 = input("Give me a noun (plural)! ") | |
noun2 = input("Give me another noun! ") | |
adjective2 = input("Give me another adjective and wait for it... ") | |
# Print the poem | |
print('') | |
print(string.capwords("A poem with " + noun1)) | |
print('') | |
print("Roses are %s" % adjective1) | |
print(noun1.capitalize() + " are blue") | |
print(noun2.capitalize() + " is " + adjective2) | |
print("And so are you!") | |
OR | |
#The text was borrowed from http://www.eduplace.com/tales/ as I have no imagination | |
#Get input | |
first_name = raw_input("Enter your first name, and press enter. ").capitalize() | |
place = raw_input("Enter a place, and press enter. ").capitalize() | |
adj1 = raw_input("Enter an adjective, and press enter. ").lower() | |
verb1 = raw_input("Enter a verb ending with ing, and press enter. ").lower() | |
famous = raw_input("Enter the name of a famous person, and press enter. ").capitalize() | |
friend = raw_input("Enter the name of a friend, and press enter. ").title() | |
verb2 = raw_input("Enter a present tense verb, and press enter. ").lower() | |
room = raw_input("Enter the name of a room, and press enter. ").capitalize() | |
instrument = raw_input("Enter the name of a musical instrument, and press enter. ").capitalize() | |
#Display story | |
print "\nAll A Dream\n" | |
print "I fell asleep yesterday listening to an old album that my mum had.\nI really enjoyed it, though I had a weird dream.\nIt was kind of like one of the old songs.\n\n" | |
print "I've been workin' in " + place + "," | |
print "All the " + adj1 + " day." | |
print "I've been workin' in " + place + "," | |
print "Just to pass the time away." | |
print "Don't you hear the whistle " + verb1 + "?" | |
print "Rise up so early in the morn." | |
print "Don't you hear " + famous + " shouting" | |
print friend + ", " + verb2 + " your horn?\n" | |
print friend + ", won't you " + verb2 + "," | |
print friend + ", won't you " + verb2 + "," | |
print friend + ", " + verb2 + " your horn?" | |
print friend + ", won't you " + verb2 + "," | |
print friend + ", won't you " + verb2 + "," | |
print friend + ", " + verb2 + " your horn?\n" | |
print "Someone's in the " + room + " with " + friend + "." | |
print "Someone's in the " + room + ", I know." | |
print "Someone's in the " + room + " with " + friend | |
print "Strumming on the old " + instrument + ".\n" | |
print "It was the weirdest dream I've had in a long time!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment