Answer
To calculate the average use
\begin{equation}
\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}
\end{equation}
Work Step by Step
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