How to do it?:

Submission: Submit the link on Github of the assignment to Canvas


NOTICE: Question 7, 8 and 9 are optional.


  1. Write a function to calculate the age of a person. Give an example to test your function.

Hint: Similar Function


  1. Write the following function. Give an example to test your function.

Hint: Similar Function


  1. Write the following function. Give an example to test your function.

Hint: Similar Function


  1. Write the following function. Give an example to test your function.

Hint: Use If-statement to combine the function in Question 3 and this function


  1. Write the following function. Give examples to test your function.

Hint:


  1. Combine the function in Question 5 and the function in this example (Link) to have a function that can plot all possible cases (2 categorical, 2 numeric, 1 numeric and 1 categorical).

NOTICE: Question 7, 8 and 9 are optional.


  1. Write the following function. Give examples to test your function.

  1. Write the following function. Give examples to test your function.

  1. Write the following function. Give examples to test your function.

Sample codes