Forgot username/password? Don't have an account?
Login with Facebook
Home » Courses » Coding Basics 1 » Answer To Math Question
Subscribe for updates.
* New to us? log in with Facebook and get a free day pass

Answer To Math Question

This video is a revision and practice to help understand new concepts learned in the last video. We'll follow all the steps mentioned in the previous video to get an answer to a complicated math equation. When we evaluate the equation according to the priority of the math symbols, the calculation becomes easier. So, practical knowledge on evaluating the math equation is a must before moving forward in the courses.

Lets review this with an example: (2-3)*3+8/(4-2). When we write this equation in trace without double quotes, Flash evaluates the final answer and prints it on the output panel. Let's now discuss the steps taken by Flash to evaluate the answer to this equation.

Firstly, the highest priority symbols will be evaluated as discussed earlier. We can see that the order of priority in this equation is

  1. () – whatever is in parenthesis is calculated first.
  2. * or / – multiplication or division next
  3. + or - – addition or subtraction last

So (2-3) and (4-2) are evaluated first which gives the first result: -1*3+8/2. We know that * and / are higher priority than + and -, so after the next evaluation the penultimate answer is -3+4. This is evaluated easily as 4-3 which gives the answer 1. Therefore anytime you need to calculate something in code strip out the complex parts based on the priority levels of (parenthesis, multiplication or division, and lastly plus or minus).

After watching this video, you might wonder how easy mathematics is. Yes, the part of math related with Flash is very simple as it's based on basic mathematical operations. If you need a refresher or you're finding yourself lost, please don't hesitate to contact your assigned trainer, use our community channels or contact us directly.

Got A Question?

'I love being Prime'

Have a question but don't want to ask it publicly? If you are a prime member just ask right here and we will get back to you within 48 hours. Not prime yet? no worries you can ask publicly below.

Act now while we have available seating

Our on line school is private, affordable and interactive with trainer support.
Act now save your seat before someone else takes yours.
Act now