Invitation to Computer Science 8th Edition

To calculate the average use $$\frac{\left(S c o r e_{1}+S c o r e_{2}+S c o r e_{3}+S c o r e_{E x a m }* 2\right)}{5}$$
Step 1 Get the values for the 4 test scores: three semester tests $S_{1}, S_{2}, S_{3}$ and one exam $S_{E} .$ Step 2 Set value for resulting weighted average $S_{F}$ as $\left[\frac{\left(S_{1}+S_{2}+S_{3}+S_{E} * 2\right)}{5}\right]$ Step 3 Print the value of $S_{F}$. Step 4 Stop