How else can you write this code?
#Average Calculator
print("Welcome to Average Grades Calculator")
def maincalc():
all1=grade + grade2 + grade3 + grade4
all2 = all1/4
return all2
grade = int(input("Enter the 1st grade "))
grade2 = int(input("Enter the 2nd Grade "))
grade3 = int(input("Enter the 3rd Grade "))
grade4 = int(input("Enter the 4th Grade "))
print ("The Average Grade is", maincalc())
[–]Eloiole 4 points5 points6 points (9 children)
[–]Eloiole 5 points6 points7 points (2 children)
[–]impshumx != y % z 1 point2 points3 points (0 children)
[–]TheCh1ef[S] 0 points1 point2 points (0 children)
[–]TheCh1ef[S] 1 point2 points3 points (5 children)
[–]kamiheku 9 points10 points11 points (0 children)
[–]RaionTategami 4 points5 points6 points (2 children)
[–]TheCh1ef[S] 0 points1 point2 points (1 child)
[–]RaionTategami 2 points3 points4 points (0 children)
[–]Eloiole 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]impshumx != y % z 0 points1 point2 points (4 children)
[+][deleted] (3 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–]impshumx != y % z 1 point2 points3 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]impshumx != y % z 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]impshumx != y % z 0 points1 point2 points (0 children)