WHAT IS WRONG WITH THE CODE????? def main(): cost=(input("do you want to go on a diving trip. (yes or no)")) if(answer == "yes"): cost=(input("it is $200 to go will you pay?") print("The cost to go is " + $200 will you pay? + ".") main()
help plz
@ultrilliam :eyes:
why?
can you help me deo
Thow
help plz
:blue:
:(
help plz
this is python, right? if so, I see two issues: in line 5: cost=(input("it is $200 to go will you pay?") you're missing an ending parentheses. you have two sets of opening parentheses, one for the input prompt, and the other for the cost variable, so you need 2 ending parentheses change to ---> cost=(input("it is $200 to go will you pay?")) there's a second issue: in line 2, you have the user input stored to the variable "cost", but you want the yes/no answer to be stored in the variable "answer" because that's how you define it in the if statement. change the cost variable to answer.
Join our real-time social learning platform and learn together with your friends!