Area of Triangle simple syntax errors

Page 1 of 1

2 Replies - 982 Views - Last Post: 15 March 2012 - 09:16 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=271040&amp;s=daab33b529574d217daaeccd343b6ab0&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

#1 Coconutmilk

Reputation: 0
• Posts: 4
• Joined: 15-March 12

Area of Triangle simple syntax errors

Posted 15 March 2012 - 09:00 AM

I think I'm missing something obvious but cannot seem to figure this out.

```def main():
import math
a = eval(input("What is a?"))
b = eval(input("What is b?"))
c = eval(input("What is c?"))
s = (float(a+b+c)/2
y = math.sqrt(x)
x = math.sqrt(s * (s - a) * (s - B)/> * (s - c))
print("The area of the triangle is.")
print("x,y")

main()
```

I keep getting invalid syntax errors wherever I try to do. I know I'm missing something really easy just cant figure it out.

Is This A Good Question/Topic? 0

Replies To: Area of Triangle simple syntax errors

#2 Motoma

Reputation: 452
• Posts: 797
• Joined: 08-June 10

Re: Area of Triangle simple syntax errors

Posted 15 March 2012 - 09:07 AM

You have an open parentheses on line 6.

#3 Coconutmilk

Reputation: 0
• Posts: 4
• Joined: 15-March 12

Re: Area of Triangle simple syntax errors

Posted 15 March 2012 - 09:16 AM

Thanks, also didn't need line 7
cheers!