TutorMe homepage
Subjects
PRICING
COURSES
Start Free Trial
Shreyansh B.
Senior Undergraduate, Computer Science, IIT Bombay
Tutor Satisfaction Guarantee
Python Programming
TutorMe
Question:

How to convert a string to an int in python?

Shreyansh B.

int(x [,base]) − Converts x to an integer. base specifies the base if x is a string.

Trigonometry
TutorMe
Question:

Prove the following: $${tan}^4 \theta+ {tan}^2 \theta = {sec}^4 \theta - {sec}^2 \theta$$

Shreyansh B.

$${tan}^4 \theta + {tan}^2 \theta = {sec}^4 \theta - {sec}^2 \theta$$ $$LHS = {tan}^2 \theta ( {tan}^2 \theta + 1 )$$ $$LHS = ({sec}^2 \theta - 1 ) ({sec}^2 \theta)$$ [since $${tan}^2 \theta + 1 = {sec}^2 \theta$$] $$LHS = {sec}^4 \theta - {sec}^2 \theta$$ $$LHS = RHS$$

C++ Programming
TutorMe
Question:

What are virtual functions and runtime polymorphism?

Shreyansh B.

A virtual function is a member function of a class(parent class) that is expected to be redefined in derived classes(children classes). When a derived class object is referred to using a pointer or a reference to the base class, a virtual function can be called for that object and the derived class's version of the function will be executed. This process of redefining and deciding which function will be called is done at runtime and hence the term polymorphism.

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