Enable contrast version

Tutor profile: Kevin C.

Inactive
Kevin C.
Engineerinng and Programming tutor
Tutor Satisfaction Guarantee

Questions

Subject: Python Programming

TutorMe
Question:

Which of the following statements can be used to generate the following list of numbers? [10, 8, 6, 4, 2] list(reversed([2, 4, 6, 8, 10])) sorted(list({4, 2, 8, 6, 10}), reverse=True) list(range(10, 0, -2)) << None of the above

Inactive
Kevin C.
Answer:

list(range(10, 0, -2)) <<

Subject: MATLAB

TutorMe
Question:

i. do the Monte Carlo estimates stabilize as Nreps increases? ii. what happens to the estimated Sn as n increases? iii. does the CI halfwidth capture the actual error behavior? iv. what happens to the CI halfwidth for Sn as n increases? v. is there anything unusual in your plots for high n and low Nreps?

Inactive
Kevin C.
Answer:

Ans: Monte Carlo estimates stabilizes with increase in Nreps since with increase in Nrep random points one obtains reduced statistical error. Ans: The volume S_n increases exponentially, attaining a peak value when n=5. Then it decreases further to infinity. My results suggest that all of the volume of a high-dimensional sphere is contained in the skin. This is due to the sphere hardening phenomenon. Ans: yes, the confidence interval halfwidth captures the actual error behavior. The width of CI decreases when Nreps increase which then reduces the statistical error. When confidence interval (CI) increases the marginal error increases Ans: The CI halfwidth decreases as n increases. Also, statistical error reduces. For high n the plots seem to stabilize but for low Nreps there is high variance. The unusualness is due to the fact that the Monte Carlo estimate of ( p) ̂ converges to p as Nreps increases.

Subject: C++ Programming

TutorMe
Question:

5. Write a program that Inputs a telephone number as string in the from (555)555-5555. The program should the function strtok to extract the area code as a token the first three digits of the phone number as a token and the last four digits of the phone number as a token. The seven digits of the phone number should be concatenated into one string. Both the area code and the phone number should be printed( hint* Use pointers)

Inactive
Kevin C.
Answer:

#include <string.h> #include <stdio.h> int main() { char str[20]; char *num[5]; int j = 0; printf("Enter a Telephone Number as a string in the form as (555)555-5555: "); scanf("%s", str); char *token = strtok(str, " ()-"); // Keep printing tokens while one of the // delimiters present in str[]. while (token != NULL) { num[j++] = token; token = strtok(NULL, " ()-"); } printf("The integer area code is given as %s\n", num[0]); printf("The long integer Telephone Number is %s%s\n", num[1],num[2]); return(0); }

Contact tutor

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

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.