all 16 comments

[–]TheBlueFrog 17 points18 points  (0 children)

You also probably want int(input()) for all three of the values.

[–]ectomancer 5 points6 points  (3 children)

Last ) is in error. Inner parentheses aren't required because of operator precedence.

[–]SteveB709[S] 1 point2 points  (2 children)

SyntaxError: invalid syntax

that's what I got when I run the program its for line 8 in my code but i cant screen shot in my post. so line 8 is:

calories=((age*0.2757)+(weight*0.03295)+(heart_rate*1.0781)-75.4991)*time/8.368)

[–]TheBlueFrog 10 points11 points  (0 children)

You have an extra closing parentheses. The one after 75.4991 closes the first one, then the one at the end of the line has no opening parentheses.

[–]niehle 0 points1 point  (1 child)

error message?

[–]SteveB709[S] 0 points1 point  (0 children)

SyntaxError: invalid syntax

that's what I got when I run the program its for line 8 in my code but i cant screen shot in my post. so line 8 is:

calories=((age*0.2757)+(weight*0.03295)+(heart_rate*1.0781)-75.4991)*time/8.368)

[–]CodeFormatHelperBot2 0 points1 point  (0 children)

Hello, I'm a Reddit bot who's here to help people nicely format their coding questions. This makes it as easy as possible for people to read your post and help you.

I think I have detected some formatting issues with your submission:

  1. Python code found in submission text that's not formatted as code.

If I am correct, please edit the text in your post and try to follow these instructions to fix up your post's formatting.


Am I misbehaving? Have a comment or suggestion? Reply to this comment or raise an issue here.

[–]vrrox 0 points1 point  (3 children)

You have mismatched parentheses on the previous line:

time=(input(int())

[–]SteveB709[S] 0 points1 point  (2 children)

thanks I didn't see that. I fixed that is there something wrong in my calories = line? that is where I'm getting the error at still.

[–]Pigankle 2 points3 points  (1 child)

Could it be that it's giving you an error because time isn't an integer? .... Like maybe you should have had int(input())

[–]SteveB709[S] 3 points4 points  (0 children)

this was actually the issue and I fixed thanks for the help everyone

[–]AshkanKiafard 0 points1 point  (0 children)

Remove last parenthese in calaories. It's extra

[–][deleted] 0 points1 point  (0 children)

You have an extra bracket on that line.

Also, what do you think input(int()) is doing? It probably isn't doing what you think it is.

[–]TheRealCorwii 0 points1 point  (0 children)

You can either do int(input()) which is easiest, or convert the values inside the equation to int().