How can I get if statements to work in my Madlibs program on python

时间:2019-03-19 15:08:00

标签: python

I have been trying to make a Madlibs program for my Python class at school where you can input a number 1-6 and get a different Madlib story for whatever number you decide but I cannot get my if statements to work. This is the current code I have and it just outputs nothing after imputing all the values. Any help is very appreciated, thanks!

print 'Madlib is starting
option = raw_input("Which madlib would you like to fill out? ")

noun1 = raw_input("Enter a noun ")
noun2 = raw_input("Enter a noun ")
adjective1 = raw_input("Enter an adjective ")
adjective2 = raw_input("Enter an adjective ")
place1 = raw_input("Enter a place ")
place2 = raw_input("Enter a place ")

if option == 1:
  print "It was 1954 and " + noun1

0 个答案:

没有答案