Subjects
PRICING
COURSES
SIGN IN
Start Free Trial
Varun N.
Pursuing undergraduate degree in computer science and specialization in computational natural sciences
Tutor Satisfaction Guarantee
Python Programming
TutorMe
Question:

What do we mean by "python decorators"?When and how are they used?

Varun N.
Answer:

A Python decorator is a specific change to the Python syntax that allows us to more conveniently alter functions and methods (and possibly classes in a future version) according to our needs.This also highly helps in code reusability(using the same function in different ways using decorators. The winning syntax as of now uses the '@' symbol for decorators: e.g: """The decorator definition""" def p_decorate(func): def func_wrapper(name): return "<p>{0}</p>".format(func(name)) return func_wrapper """tell python to apply the decorator on get_text function""" @p_decorate def get_text(name): return "lorem ipsum, {0} dolor sit amet".format(name) So , a call to get_text ends up calling it followed by the decorator applying the desired changes.

Javascript Programming
TutorMe
Question:

What is the purpose of the "this" operator in Javascript?

Varun N.
Answer:

JavaScript famous keyword this always refers to the current context. Naive explanation: We use this similar to the way we use pronouns in natural languages like English.in JavaScript, we use the this keyword as a shortcut, a referent; it refers to an object; that is, the subject in context, or the subject of the executing code. Just like the pronoun “he” is used to refer to the antecedent (antecedent is the noun that a pronoun refers to), the this keyword is similarly used to refer to an object that the function (where this is used) is bound to.

Java Programming
TutorMe
Question:

What gives Java its 'write once and run anywhere' nature?

Varun N.
Answer:

The bytecode. Java is compiled to be a byte code which is the intermediate language between source code and machine code. This byte code is not platform specific and hence can be fed to any platform.This is just like a movie or song that can be run on any device irrespective of the device on which it is run.The output is platform independent hence much easier to use.

Send a message explaining your
needs and Varun will reply soon.
Contact Varun
Ready now? Request a lesson.
Start Session
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 Session" 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.