Skip to content

Commit e81d569

Browse files
committed
Add Madlibs Generator
1 parent 016128c commit e81d569

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

madlibs.py

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
3+
loop = 1
4+
5+
while (loop < 10):
6+
7+
# All the questions that the program asks the user
8+
9+
noun = input("Choose a noun: ")
10+
11+
p_noun = input("Choose a plural noun: ")
12+
13+
noun2 = input("Choose a noun: ")
14+
15+
place = input("Name a place: ")
16+
17+
adjective = input("Choose an adjective (Describing word): ")
18+
19+
noun3 = input("Choose a noun: ")
20+
21+
#Displays the story based on the users input
22+
23+
print ("------------------------------------------")
24+
25+
print ("Be kind to your",noun,"- footed", p_noun)
26+
27+
print ("For a duck may be somebody's", noun2,",")
28+
29+
print ("Be kind to your",p_noun,"in",place)
30+
31+
print ("Where the weather is always",adjective,".")
32+
33+
print ()
34+
35+
print ("You may think that is this the",noun3,",")
36+
37+
print ("Well it is.")
38+
39+
print ("------------------------------------------")
40+
41+
# Loop back to "loop = 1"
42+
43+
loop = loop + 1

0 commit comments

Comments
 (0)