Enable contrast version

Tutor profile: Daniel N.

Inactive
Daniel N.
Full Stack Developer at UNC Lineberger Comprehensive Cancer Center
Tutor Satisfaction Guarantee

Questions

Subject: Javascript Programming

TutorMe
Question:

Write a function called sumOfNumbers that takes in parameter arrayOfNumbers that returns the average of all the values in a single array of numbers in javascript? Note: arrayOfNumbers is an array.

Inactive
Daniel N.
Answer:

function sumOfNumbers(arrayOfNumbers){ var sum = 0; for(var i =0; i<arrayOfNumbers.length; i++){ sum = sum + arrayOfNumbers[i]; } var averageResult = sum/arrayOfNumbers.length; return averageResult; }

Subject: Basic Math

TutorMe
Question:

How do you find the average, median, and mode of a given data set?

Inactive
Daniel N.
Answer:

Average: You add up the numbers and after finding the sum, you divide that number by the total amount of numbers there are. Median: First you order the numbers in ascending order (least to greatest). Afterwords you find the middle number. If there are two numbers that split the middle, you can take average the two numbers to find the median. Mode: To make this easy, you can order the numbers in ascending order (least to greatest). After sorted, you just find which number appears the most. There can be multiple modes if needed.

Subject: Computer Science (General)

TutorMe
Question:

Given an array of numbers (i.e. [4, ,2, 7, 11]) and a random number (i.e. 13), describe how you would go about checking if 2 numbers in that array sum to the random number?

Inactive
Daniel N.
Answer:

First method is you could use a double "for loop" to iterate through each of the numbers checking if any sum of two numbers equals the random number. If two numbers sum up to the random number you can return true. Second method you could use a hashmap and map through that in order to see if 2 numbers sum up to the random number. If the compliment of the selected number exists in the hash, then return true.

Contact tutor

Send a message explaining your
needs and Daniel will reply soon.
Contact Daniel

Request lesson

Ready now? Request a lesson.
Start Lesson

FAQs

What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Lesson" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.