4.8 Correction challenge
We are going to make the correction of our challenge. Starting by declaring the variable gameOver. Which is equal to true then the variable Scor equal to 100 forgive equal to 1000 then our bonus equal to 200 And then the final score Then we will calculate the final score and display the result, but before we can calculate the final score the game must be terminal we will perform a condition if gameOver equals true Then we can calculate the final score so final score. Equals a. Score plus bonus now we can display the final score Compile our program and see if it works the final score equals 1200 given that scoreFinal equals score which equals 1000 Plus the bonus which is equal to 200 let's go back to our if condition we can remove equal to true as we saw in the previous video and our program will work exactly the same the result 1200 in the next lesson we will see the methods I will explain you what is the method and what are the different type of method that we have soon