[Tutor] Python Help
steve at pearwood.info
Fri Oct 26 06:47:27 EDT 2018
On Thu, Oct 25, 2018 at 06:14:41PM -0400, Ben Placella wrote:
> I need to write code that runs a cost calculating program with many
> different variables and I honestly don't understand it, my code is:
> beefmeals=int(input("Enter number of beef meals: "))
> shitmeals=int(input("Enter number of vegan meals: "))
What version of Python are you using?
> if party<=50
You have lost the indentation, making your code invalid.
Also, you are probably getting a SyntaxError when you try to run your
code. As always, please COPY AND PASTE (don't retype it from memory, or
take a photo) the entire traceback, starting from the line
"Traceback..." and ending with the error message.
> print("Room cost $75")
> elif party <=150
> print("Room cost $150")
> print("Room cost $250")
That's two more syntax errors.
Dollar signs aren't used for Python variables.
More information about the Tutor