ML Assignment Last
ML Assignment Last
(Last)
Note:
Submit assignment in group (3-4 Students).
Submission of all tasks of assignment should be in hard form and each group
member should attach certificates of task 1 individually.
Task # 3 should be written on plain white A4 page.
Assignment submission deadline is Dec 20, 2021. Failing to submit on time
will result in the reduction of marks.
Task # 1
Enrol in the following course https://www.udemy.com/course/free-python/
Watch and complete above free python course and attach hard copy of
course certificate with your assignment.
Task # 2
Perform following tasks using Python
1: Lists, Dictionaries, Tuples (10 Marks)
Lists
Given a list:
nums = [3, 4, 7, 8, 15]
Make another list named cubes and append the cubes of the given list in this list and print it.
Dictionaries
You are given an empty dictionary: dic = {}
Add the following data to the dictionary: ‘person’: 2, ‘cat’: 4, ‘spider’: 8, ‘horse’: 4 as key
value pairs.
Use the ‘items’ method to loop over the dictionary and print the animals and their
corresponding legs.
Sum the legs of each animal, and print the total at the end.
Tuples
Given the following tuple:
D = (1,15,4,[5,10])
B = np.array([[5,6],[7,8]])
v = np.array([9,10])
Task # 3
Consider the table given below and classify X and X’ to find out the possibility of
Playing Football by using Naïve Bayes Classifier.