-->
当前位置:首页 > 题库

PROGRAMMING:Input the length of the three sides of the triangle and calculate the area of the triangle (exercise 3-8, fundamentals and applications of Python programming, Higher Education Society)

Luz5年前 (2021-05-10)题库544
Programming function: input the length of the three sides of the triangle, calculate the area of the triangle, and use the user-defined function to calculate the area.
The output area retains two decimal places.
###Input format:
Side length 1 < br > 1
Side length 2 < br > 2
Side length 3 < br > 1
###Output format:
When the three sides may form a legal triangle, the output should be: < br > 0
```
the measure of area
```
When the three sides cannot form a legal triangle, the output is: < br > 0
```
data error
```
###Input example:
```in
three
four
five
```
###Output example:
```out
six
```
It is suggested that Helen formula can be used for area calculation; The sum of the two sides is greater than the third side; The difference between the two sides is less than that of the third side.







answer:If there is no answer, please comment