0% found this document useful (0 votes)
3 views5 pages

Python Material 2025 Extra Programms

Uploaded by

hatim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

Python Material 2025 Extra Programms

Uploaded by

hatim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

Sample Output:
615

2.

3
4

5
6.

7.
Triangle Area Calculator
Write a Python program that will accept the base and height of a triangle and compute its area.
Python: Area of a triangle
A triangle is a polygon with three edges and three vertices. It is one of the basic shapes in geometry.
A triangle with vertices A, B, and C is denoted triangle ABC.
• Vertex of a triangle: The point at which two sides of a triangle meet.
• Altitude of a triangle: The perpendicular segment from a vertex of a triangle to the line
containing the opposite side.
• Base of a triangle: The side of a triangle to which an altitude is drawn.
• Height of a triangle: The length of an altitude.
8
Conditional Sum to 20
Write a Python program to sum two given integers. However, if the sum is between 15 and 20 it will
return 20.
Pictorial Presentation:

You might also like