#!/bin/zsh
echo "enter quiz1 score:"
read quiz1
echo "enter quiz2 score:"
read quiz2
echo "enter seatwork score:"
read seatwork
echo "enter exam score:"
read exam
echo "enter lab1 score:"
read lab1
echo "enter lab2 score:"
read lab2
echo "enter lab3 score:"
read lab3
quiz1total=$((quiz1/20))
quiz2total=$((quiz2/30))
quiztotal=$(($quiz1total+$quiz2total))
quizaverage=$(($quiztotal*.20))
examtotal=$(($exam/50))
examaverage=$(($examtotal*.40))
seatworktotal=$((%seatwork/20))
seatworkaverage=$((seatworktotal*.20))
labtotal=$(($lab1+$lab2+$lab3))
labtotals=$(($labtotal/300))
labaverage=$(($labtotals*.20))
midterm=$(($quizaverage+$examaverage+$seatworkaverage+$labaverage))
midtermgrade=$(($midterm*100)
echo "your midterm grade is: $midtermgrade"
测验1总分是20测验2总分是30考试总分是50功课总分是20中期成绩=平均测验20%功课20%考试40%实验室20%
—
Johnrey
—
wjandrea