Write a program to find average marks obtained by a class of 30 students in a test
Answers
python program to find average marks obtained by a class of 30 students in a test:
print("I am a Python Program to find average of 30 numbers")
n1 = input("Enter Number 1: ")
n2 = input("Enter Number 2: ")
n3 = input("Enter Number 3: ")
n4 = input("Enter Number 4: ")
n5 = input("Enter Number 5: ")
n6 = input("Enter Number 6: ")
n7 = input("Enter Number 7: ")
n8 = input("Enter Number 8: ")
n9 = input("Enter Number 9: ")
n10 = input("Enter Number 10: ")
n11 = input("Enter Number 11: ")
n12 = input("Enter Number 12: ")
n13 = input("Enter Number 13: ")
n14 = input("Enter Number 14: ")
n15 = input("Enter Number 15: ")
n16 = input("Enter Number 16: ")
n17 = input("Enter Number 17: ")
n18 = input("Enter Number 18: ")
n19 = input("Enter Number 19: ")
n20 = input("Enter Number 20: ")
n21 = input("Enter Number 21: ")
n22 = input("Enter Number 22: ")
n23 = input("Enter Number 23: ")
n24 = input("Enter Number 24: ")
n25 = input("Enter Number 25: ")
n26 = input("Enter Number 26: ")
n27 = input("Enter Number 27: ")
n28 = input("Enter Number 28: ")
n29 = input("Enter Number 29: ")
n30 = input("Enter Number 30: ")
sum = n1+n2+n3+n4+n5+n6+n7+n8+n9+n10+n11+n12+n13+n14+n15+n16+n17+n18+n19+n20+n21+n22+n23+n24+n25+n26+n27+n28+n29+n30
average = sum/30
print ("sum:",sum)
print ("average:",average)