New average grade calculator ftw.
This time, you can execute the thing without changing anything, that is, if you have the same class setup as me. It prompts you for your grades within the program.
Didn't feel like adding colours.
print("Welcome to Sonicfan574's Class Average Finder.")
print("Enter your 0 Hour grade...")
Class0 = io.read() -- Prompt user for 0 Hr grade
print("Alright, got it, your 0 Hour grade is " .. Class0 .. "%. Please enter your 1st Hour grade...")
Class1 = io.read() -- Prompt user for 1st Hr grade
print("Alright, got it, your 1st Hour grade is " .. Class1 .. "%. Please enter your 2nd Hour grade...")
Class2 = io.read() -- Prompt user for 2nd Hr grade
print("Alright, got it, your 2nd Hour grade is " .. Class2 .. "%. Please enter your 3rd Hour grade...")
Class3 = io.read() -- Prompt user for 3rd Hr grade
print("Alright, got it, your 3rd Hour grade is " .. Class3 .. "%. Please enter your 4th Hour grade...")
Class4 = io.read() -- Prompt user for 4th Hr grade
print("Alright, got it, your 4th Hour grade is " .. Class4 .. "%. Please enter your 5th Hour grade...")
Class5 = io.read() -- Prompt user for 5th Hr grade
print("Alright, got it, your 5th Hour grade is " .. Class5 .. "%. Please enter your 6th Hour grade, this is the last one.")
Class6 = io.read() -- Prompt user for 6th Hr grade
print("Got it, your 6th Hr grade is " .. Class6 .. "%.")
print("That's it, calculating your average...")
Divide = Class0+Class1+Class2+Class3+Class4+Class5+Class6 -- Add up the grades
FinalResult = Divide/7 -- Divide the grades by the number of classes
print("Your grade average is " .. FinalResult .. ".")
print("Thanks for using Sonicfan574's Class Average Finder!")