217k views
1 vote
Fix the code :)

- # - description of lesson lesson (3.05)

def main():
print("This progam will display a story for you")
print
person = input("Please give me a celebrity name")
setting = input("Please give me your favorite place to go")
time = input("Please give me a time of year")
item = input("please give me the name of your favorite food")
print("Once there was a person by the name of " + person + " who was visting the " + setting + " ." + " decide that
because of quarantine it was so boring and being that it was " + time + " it was time to go eat " + item + ".")

2 Answers

5 votes

Answer:

def main():

print("please answer all the qustions for this to work")

person = input("Please give me your name example ryland")

setting = input("Please give me where you are example house ")

time = input("Please give me the time example 12:00 ")

item = input("please give me the name of your favorite food example tacos ")

print("Once there was a person who was called " + person + " who was at there " + setting + "." + " At " + time + " you got hungry it was time to go eat " + item + ")

main()

Step-by-step explanation:

Hope dis works

User Goblin Alchemist
by
6.2k points
4 votes

def main():

print("This progam will display a story for you")

person = input("Please give me a celebrity name ")

setting = input("Please give me your favorite place to go ")

time = input("Please give me a time of year ")

item = input("please give me the name of your favorite food ")

print("Once there was a person by the name of " + person + " who was visting the " + setting + " ." + " decide that because of quarantine it was so boring and being that it was " + time + " it was time to go eat " + item + ".")

main()

You have to indent everything inside the main function and then call the main function. The code runs find after that.

User KMK
by
5.8k points