float midTermScore=80;
float finalScore=80;
float assignmentScore=40;
float otherScore=20;
float midTermScoreRatio=0.2;
float finalScoreRatio=0.3;
float assignmentScoreRatio=0.4;
float otherScoreRatio=0.1;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
float semesterScore;
semesterScore=midTermScore*midTermScoreRatio+
finalScore*finalScoreRatio+
assignmentScore*assignmentScoreRatio+
otherScore*otherScoreRatio+
// put your main code here, to run repeatedly:
Serial.println(semesterScore);
delay(1000); // this speeds up the simulation
}