Enable contrast version

Tutor profile: Alex M.

Inactive
Alex M.
Computer Science Teacher
Tutor Satisfaction Guarantee

Questions

Subject: Python Programming

TutorMe
Question:

How does a list differ from a tuple?

Inactive
Alex M.
Answer:

Lists in Python are mutable objects: they can be changed after being created. That means new members can be added, removed, or current members modified. Tuples in Python are immutable: they cannot be changed after being created. That means no new elements can be added or removed. However, elements in a tuple can be changed if the elements are mutable.

Subject: Java Programming

TutorMe
Question:

What does the static keyword do when used to label a variable within an object?

Inactive
Alex M.
Answer:

The static keyword in front of a variable makes the compiler create a single instance of said variable shared between all of the classes that have the variable. For the class shown below, every instance of Object will have the same count variable with the same value. Changing count in one object will change count in all objects. class Object{ static int count = 0; Object() { count++; } } So for the code below, both print statements will print the same value, 2. Object o1 = new Object(); Object o2 = new Object(); System.out.println(o1.count); System.out.println(o2.count);

Subject: C++ Programming

TutorMe
Question:

How does pass-by-reference differ from pass-by-value in C++?

Inactive
Alex M.
Answer:

Pass-by-reference passes a pointer or memory address of an object/variable into a function. This allows any changes to the object/variable inside the function to remain once it leaves the scope of the function. This can be seen in the function below: void add(int &num1, int &num2) { num += num2; } Pass-by-value passes a copy of the object/variable into a function. This prevents the original object/variable from being inadvertently changed by the function. All changes remain within the scope of the function. This can be seen in the function below: void add(int num1, int num2) { num += num2; }

Contact tutor

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

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.
BEST IN CLASS SINCE 2015
TutorMe homepage
Made in California by Zovio
© 2013 - 2021 TutorMe, LLC
High Contrast Mode
On
Off