# Tutor profile: Benjamin R.

## Questions

### Subject: Java Programming

What is a function and why do we use them?

A function is a piece of code that runs only when it is called. It can take in any number of inputs, perform operations, and return a value to where it was called. Functions allow us to define a behavior once and then reuse it as many times as we need. For example, we can write a function called square which takes in a number and returns its square. This would be useful if we wanted to print out all of the perfect squares up to 100.

### Subject: Writing

What is varied sentence structure and why is it important?

Varied sentence structure means changing the length and form of your sentences in a piece of writing. Too many sentences with the same length and structure becomes monotonous for the reader. Short sentences can be use to emphasize important points while longer sentences can provide supporting details.

### Subject: Algebra

Evaluate $$-16 + 5 * {(6 \div 2)}^2$$

We will use order of operations (PEMDAS) to help us solve this problem. First, we check for any parentheses and find the expression $$(6 \div 2)$$. We can evaluate this by dividing 6 by 2, which gives us 3. We then replace the parentheses with a 3, giving us $$-16 + 5 * 3^2$$. Moving on to the next operate, we check for exponents and find $$3^2$$, which we can simply to 9. Our expression now reads $$-16 + 5 * 9$$. We move onto multiplication and division, and see that we need to evaluate $$5 * 9 = 45$$. We are then left with $$-16 + 45$$ and our final two operations, addition and subtraction. Therefore, we add these two terms to get $$-16 + 45 = 29$$.

## Contact tutor

needs and Benjamin will reply soon.