

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Faizan ul haque C
Familiarization with Python language using function, class and object. LAB TASKS: 1: Write a function called describe_city( ) that accepts the name of a city and its country. The function should print a simple sentence, such as Islamabad is in Pakistan. Give the parameter for the country a default value. Call your function for three different cities, at least one of which is not in the default country. 2: Write a function called absolute_num() that accepts one parameter, num. The function should return only positive value, and apply condition on it. This function returns the absolute value of the entered number
Faizan ul haque C 3: Create a Class “Employee”, it’s a common base class for all the employee. Then initialize employee’s parameter like empName and salary and create function like displayCount() contain total number of employee in your knowledge base and displayEmployee() contain empName and their salary.