Below is two lines of code that use expressions |
UserScore = 10 + 20 + 5 |
The code 10 + 20 + 5 is called an expression. OpusScript calculates the value of an expression and stores the result in the variable (e.g. UserScore = 35). In the second line of code, the expression calculates a percentage – QuizTotal contains the maximum possible score for a quiz and UserScore is the score gained by the user. The value of the expression is calculated and stored in the variable UserTotal. |