# Tutor profile: Irfaan K.

## Questions

### Subject: Computer Science (General)

Suppose you have an array of integers $$arr$$ with an arbitrary length. Write a method/function called $$average$$ which takes one parameter ($$arr$$) which returns the mean of all the elements in $$arr$$ as a double. You may complete this challenge in any programming language of your choice.

We can solve this problem using a for-loop. Here's an example solution in Java: private static double average(int[] arr) { int sum = 0; for (int elem : arr) { sum += elem; } return (double) sum / arr.length }

### Subject: ACT

Suppose you have a triangle $$\Delta ABC$$. If $$\angle A$$ is $$90°$$ and $$\angle B$$ is $$56°$$, which of the following statements can we make about $$\angle C$$? $$A)$$ $$\angle C$$ is $$90°$$ $$B)$$ $$\angle C$$ is $$34°$$ $$C)$$ $$\angle C$$ is larger than $$56°$$ $$D)$$ None of the above

Fundamentally, we must recall that the sum of all angles of any triangle is $$180°$$. Provided we know this, we can determine that $$\angle A + \angle B + \angle C = 180°$$. We know that $$\angle A$$ is $$90°$$ and $$\angle B$$ is $$56°$$, so we can solve for $$\angle C$$ via substitution: $$90° + 56° + \angle C = 180°$$ $$146° + \angle C = 180°$$ $$\angle C = 180° - 146°$$ $$\angle C = 34°$$ Therefore, option $$B$$ is the correct choice.

### Subject: Algebra

Consider $$f(x) = x^2 + 4x - 21$$. Determine where $$f(x)$$ intersects the x-axis.

We begin by factoring $$f(x) = x^2 + 4x - 21$$ - doing so will help us determine the roots of $$f(x)$$ and, subsequently, where the graph intersects the x-axis. We factor $$f(x)$$ and obtain $$f(x) = (x+7)(x-4)$$. Now, we take each of these roots and set them equal to $$0$$ to determine our points of intersection along the x-axis. Solving $$(x+7) = 0$$ yields $$x=-7$$. Solving $$(x-4) = 0$$ yields $$x=4$$. Therefore, $$f(x)$$ intersects the x-axis at two points: $$x=-7$$ and $$x=4$$.

## Contact tutor

needs and Irfaan will reply soon.