Enable contrast version

Tutor profile: Priscilla L.

Inactive
Priscilla L.
Computer science major at Wellesley College
Tutor Satisfaction Guarantee

Questions

Subject: Javascript Programming

TutorMe
Question:

function test(input) { console.log(input+10); } What gets printed out when test(10) is called? What about test("hello")? Why is this allowed?

Inactive
Priscilla L.
Answer:

test(10) prints "20". test("hello") prints "hello10". This is because Javascript is an untyped language. It doesn't compile statically or check types.

Subject: Java Programming

TutorMe
Question:

Compute the factorial of some number. Given n of 1 or more, return the factorial of n, which is n * (n-1) * (n-2) ... 1.

Inactive
Priscilla L.
Answer:

public static int factorial(int n) { if (n==1) { return 1; } else return n*factorial(n-1); }

Subject: Computer Science (General)

TutorMe
Question:

Using Java, write a method that accomplishes the following: Given an array of integers, return the maximum value. Assume that the array is non-empty.

Inactive
Priscilla L.
Answer:

public static int max(int[] numbers) { int max = numbers[0]; for (int i = 0; i < numbers.length; i++) { int num = numbers[i]; if (num > max) { max = num; } } return max; }

Contact tutor

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

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.