0 valutazioniIl 0% ha trovato utile questo documento (0 voti)
25 visualizzazioni6 pagine
The document contains code snippets for several Python programs:
1) A program to calculate the area of a triangle by taking in three side lengths as input and using the semi-perimeter formula.
2) A program to calculate simple interest by taking in principal amount, rate of interest, and number of years.
3) A program to calculate the area and circumference of a circle by taking in the radius as input.
4) A program to swap the values of two variables using a temporary variable.
5) A program to check if a year entered by the user is a leap year or not.
The document contains code snippets for several Python programs:
1) A program to calculate the area of a triangle by taking in three side lengths as input and using the semi-perimeter formula.
2) A program to calculate simple interest by taking in principal amount, rate of interest, and number of years.
3) A program to calculate the area and circumference of a circle by taking in the radius as input.
4) A program to swap the values of two variables using a temporary variable.
5) A program to check if a year entered by the user is a leap year or not.
The document contains code snippets for several Python programs:
1) A program to calculate the area of a triangle by taking in three side lengths as input and using the semi-perimeter formula.
2) A program to calculate simple interest by taking in principal amount, rate of interest, and number of years.
3) A program to calculate the area and circumference of a circle by taking in the radius as input.
4) A program to swap the values of two variables using a temporary variable.
5) A program to check if a year entered by the user is a leap year or not.