Ask your own question, for FREE!
Miscellaneous 24 Online
yy:

what is wroung with the code def main(): answer = input("do you whant to go on a diving trip or a snorkling trip?") if(answer == "diving trip"): cost = input("Do you what to go cage diving is $200 or regular diving at $200?") print("The cost is $200 to go " + cost + ".") people = input("Do you what to go in a group trip or single trip?") print("The cost is $200 to go in a " + people + ".") else: trip = input("Do you what to go in a group trip or single trip?") print("The cost is $300 to go in a " + trip + ".") mask = input("Do you what a full mask or a two piece mask?") print("That will be $50 for the " + mask + ".") print("Thank you for your help.") main()

yy:

help plz

ShadowOfDeath:

What language is this in?

yy:

english

ShadowOfDeath:

What coding language?

yy:

python

ShadowOfDeath:

No syntax errors.

ShadowOfDeath:

What do you think could be wrong with it?

yy:

line 16 it sayd

yy:

one of the prints

ShadowOfDeath:

"print("The cost is $300 to go in a " + trip + ".")" This line is indented.

ShadowOfDeath:

If you look at the rest of the coding, it doesn't show as indented. Change all of the indented text to meet the rest of the "print" text.

yy:

ok

ShadowOfDeath:

If that's not the issue, I don't see any others.

yy:

no it is the print("The cost is $200 to go in a " + people + ".") print

ShadowOfDeath:

I think taking out the "a" before "+ people +" would work.

yy:

ok

ShadowOfDeath:

If this isn't it, I don't know.

yy:

nope

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!