Question: 1) Write a Python program that asks the user to enter students grades. The program should keep accepting grades and stops once a negative value
1)
Write a Python program that asks the user to enter students grades. The program should keep accepting grades and stops once a negative value is entered. Finally, the program prints the number of grades entered, summation and average of all grades.
Here is an example of the program output:
Enter the grade of student 1: 70 Enter the grade of student 2: 0 Enter the grade of student 3: 80.75 Enter the grade of student 4: -1
You entered grades for 3 students The summation of grades is 150.75 and the average is 50.25
2)
The area A of a triangle can be found by 2 = ( )( )( ), where a, b, c are
sides of triangle and s = 1 ( + + ). 2
Write a Python program that asks the user to enter the length of a triangle sides then calculates and displays the area of the triangle by this formula.
Here is an example of the program output:
Enter the first side: 1.5 Enter the second side: 3 Enter the third side: 2.5
The area is: 1.871
in python please
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
