Reputation: 1
anwser=str(input("Do you need a new phone? "))
if answer== "no":
print ("You are now finished. ")
else:
question1=str(input("Do you know what phone you want? ")
if question1== "no":
print("Research different phones and chose which pne you like best.")
else:
question2=str(input("Do you want to go on a contract? ")
if question2== "no":
question3=str(input("Do you have enought money to pay full price for your phone? ")
What is wrong? How do I improve? It keeps coming up with a syntax error and I don not know why.
Upvotes: 0
Views: 52
Reputation: 6553
You're missing closing parentheses on your question lines:
question1 = str(input("Do you know what phone you want? ")
Should be:
question1 = str(input("Do you know what phone you want? "))
You also don't need to convert the input to a string, because input()
already does that for you:
input([prompt])
If the prompt argument is present, it is written to standard output without a trailing newline. The function then reads a line from input, converts it to a string (stripping a trailing newline), and returns that.
Upvotes: 3