ICP 3 - awais546/Python-and-Deep-Learning GitHub Wiki
Python and Deep Learning
Introduction
In this ICP we got the overview of making classes and the concept of inheritance. Also we got the basic of web scraping using Beautifulsoup and basic function of Numpy libraries.
Task
Following are the three tasks performed
- Making of class Employee with child class of Full time Employee
- Web Scrape using beautifulsoup and extract the href links from the page
- Perform reshaping and replacing of numpy array values
Question 1
This question is comprised of Employee class with class and data attributes. It contains multiple functions like average_salary and print_data. Average salary calculates the average salary of all the employees. This function is redefined in the child classes FullTimeEmployee and PartTimeEmployee. Following is the screenshot of the classes
Questions 2
In this question we used the Beautifulsoup library for webscraping. We got the result in html form and extracted all the href urls from the page and saved it in the text file. The following code shows the extraction of href elements.
The following screenshot shows the result saved in text file
Question 3
In this question we performed basic operations using numpy array like initializing float array, reshaping the array and replacing the values. Following screenshot shows the code.
The following screenshot shows the reseult.