# Tutor profile: Stanley V.

## Questions

### Subject: Basic Math

In my village of 100 people , it was found that the ratio of people sick with the corona virus to those who were still healthy was 2:3. The health officials further realized that the ratio of sick old people to the sick young people was 3:1. How many old people are sick in my village?

Though the problem seems complex, we can work through it in a few easy steps. 1. Our aim is to find out the number of total number of old people who are sick For every 3 healthy people in the village, 2 people are sick. This means that in a group of 5 people (3 healthy + 2 sick) , 2 people would be sick. We can think of the village as having 20 such groups. ( 100/5 = 20) In each group there are 2 people who are sick. This means that in 20 groups, there will be 40 people (20*2) who are sick. We can also think of it as 2/5 of the population is sick. In terms of fractions we can represent the information as : Total Sick people = (2/5) * Total Number Of People Total Sick people = (2/5) * 100 Total Sick People = 40 The health officials have also realized that for every 3 old people who fell sick, only 1 young person was infected by the virus which means, that in a group of 4 sick people ( 3 people would be old and 1 would be young). This is the same as saying 3/4th of the sick people are old people. Since we know that the village has 40 sick people in total this means that we can divide the sick people into 10 groups of 4 people each. In each group there will be 3 old and sick people. Therefore the total number of old people who are also sick is 30. (10 * 3) In terms of fractions we can represent this as Sick Old People = (3/4) * Total Sick people Sick Old People = (3/4) * 40 Sick Old people = 30

### Subject: C Sharp Programming

Reverse a string recursively

To solve this problem , let's build out our strategy for recursion. The recursive solution can be implemented if the solution has the following elements: 1. The solution can be broken down into repetitive steps 2. The repetition of steps leads to a base conditions which signals that the required goal has been achieved and stops further recursion For the the given problem let us go about understanding and breaking down the problem. Consider a string as an array of characters. Lets think of reversing a string as composed of the following steps : 1. Split the string into two groups - Group1 = first character in string . Group2 = rest of the string. 2. If Group2 is not a single character, Reverse Group2 otherwise keep Group 2 as it is. 3. Append Group1 to the end of the reversed string from Group2. Consider a string with a single character . Example "S" Based on this algorithm, the single character string in reversed form will be the string itself and we can sider this as our signal for the recursion to stop. Consider a string with 2 characters. example - "ST" Step1 - Remove "S" and we are left with "T" Step2 - Attach "S" to the end the remaining string "T" because the remianing string only has a single character. This gives "TS" and the string is reversed Now consider a string with 3 characters . Example "STA" Step1 - Remove "S" and we are left with "TA" Step 2 - "TA" is not a single character string therefore perform string reversal on the substring "TA" which is equivalent to the 2 character case discussed before. Therefore string reversal operation on "TA" will give "AT" Step 3 - Now append the character "S" from Step1 to the end of the reversed substring in Step2 - This gives us "ATS" and the whole string is reversed. In C# syntax, the recursive method will look like : public static string ReverseStringRecursive(string str) { if (str.Length <= 1) { return str; //If string is of single character, reversed string will be the same. } else { return ReverseStringRecursive(str.Substring(1)) + str[0]; //Reverse the substring and append the first character to the end } }

### Subject: Physics

A medicine ball is taken to the moon where it weighs 10 pounds and is allowed to fall down from shoulder height. At the same time a sack of feathers weighing 5 pounds is dropped from the same height in a vacuum chamber on the earth. It is observed that the ball takes 'x' seconds to hit the surface of the moon. It is observed that the sack of feathers takes 'y' seconds to hit the ground. How do 'x' and 'y' compare to each other ?

Both the sack of feathers on earth and the medicine ball on the moon have to cover the same distance to the ground since both of them are dropped from the same height from the surface. Neither of the objects were thrown down. Both were dropped. This means that their initial velocity at the start of the fall/drop was 0. For a free falling object acted by gravitational pull of the earth/moon, the time takes to fall from a height 'h' is given as t = sqrt(2*h/a) where, t = time, h = height a = acceleration due to gravity Notice that the time taken is independent of the weight of the objects. The time takes in dependent on the acceleration due to gravity and the height through which the objects are falling. Since the height 'h' is same for both the cases we are dealing with , we can say that ultimately the time required to hit the ground is inversely proportional to the square root of the acceleration due to gravity. On the moon, this value is less than on the earth. Because of this the medicine ball on the moon will take a longer time to hit the ground that the sack of feathers on the earth.

## Contact tutor

needs and Stanley will reply soon.