Computer Science, asked by utkarshisyo, 1 year ago

write a program to receive 3 subjects marks of five students and calculate their total and average in python

class 11

Answers

Answered by kinghappy
0

Answer:

Let see you have a list of numbers and you want to calculate the sum of numbers present in the list.

All you need to do is to iterate a list using a for loop and add each number to a sum variable.

Calculate the length of a given list(total numbers in a list) and divide the sum by total length to calculate average.

Explanation:

please mark me down as a BRAINLIEST for more answers please follow me.

Answered by ni14920914tin
1

Answer:Python Program to calculate average

print ("calculate an average of first n natural numbers")

n = input("Enter Number ")

n = int (n)

average = 0

sum = 0

for num in range(0,n+1,1):

sum = sum+num;

average = sum / n

print("Average of first ", n, "number is: ", average)

Explanation: Thanksgiving

Similar questions