"area of triangle" Code Answer's

You're definitely familiar with the best coding language Python that developers use to develop their projects and they get all their queries like "area of triangle" answered properly. Developers are finding an appropriate answer about area of triangle related to the Python coding language. By visiting this online portal developers get answers concerning Python codes question like area of triangle. Enter your desired code related query in the search bar and get every piece of information about Python code related question on area of triangle. 

how to find the area of a triangle

By A General CoderA General Coder on Apr 30, 2020
#this is the code to find the area of a parrelogram and triangle
#change the numbers to select what height and base your shape is

b = 3 #b is base 
h = 3 #h is height (middle)


t = 5 #this is the base of the triangle
i = 5 #and this is the height
p = t*i #dont touch this


print("this is the area of the parrelogram")
print(b * h)

m = input("do you want to calculate a triangle? (space before answer)") 

print(m)

if m == " yes":
    print ("this is the area of the triangle that you inputed")
    print (p/2)
else:
    print("ok")

Add Comment

8

area of triangle

By Powerful PlatypusPowerful Platypus on Apr 30, 2021
import java.util.Scanner;

public class shw2point15 {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        System.out.println("Enter three points for a triangle:");

        double x1 = input.nextDouble();
        double y1 = input.nextDouble();
        double x2 = input.nextDouble();
        double y2 = input.nextDouble();
        double x3 = input.nextDouble();
        double y3 = input.nextDouble();


        double s = ((x1 + y1) + (x2 + y2) + (x3 + y3)) / 2;
        double area = Math.sqrt(s * (s - (x1 - y1)) * (s - (x2 - y2)) * (s - (x3 - y3)));



        System.out.println("The area of the triangle is " + area);
    }
}

Source: stackoverflow.com

Add Comment

1

triangle area formula

By Testy ToucanTesty Toucan on Jan 25, 2021
double traingleArea  = base * height / 2; 

Add Comment

4

area of rectangle

By Random boiRandom boi on Sep 17, 2020
Area of rectangle = Length * Width

Add Comment

2

All those coders who are working on the Python based application and are stuck on area of triangle can get a collection of related answers to their query. Programmers need to enter their query on area of triangle related to Python code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about area of triangle for the programmers working on Python code while coding their module. Coders are also allowed to rectify already present answers of area of triangle while working on the Python language code. Developers can add up suggestions if they deem fit any other answer relating to "area of triangle". Visit this developer's friendly online web community, CodeProZone, and get your queries like area of triangle resolved professionally and stay updated to the latest Python updates. 

Python answers related to "area of triangle"

View All Python queries

Python queries related to "area of triangle"

Browse Other Code Languages

CodeProZone