Question: Assignment 3(Functions) 1. Write a function that can accept two variables and calculate the addition and subtraction of it. And also it must return both
Assignment 3(Functions) 1. Write a function that can accept two variables and calculate the addition and subtraction of it. And also it must return both addition and subtraction in a single return call 2. Write a function that accept name, and salary and display both, and if the salary is missing in function call it should show it as 9000 3. Write a function that returns area of circle. Hint: circle of area is pi*radius*radius a. define the Pi argument default value as 3.14 and radius should take user input. 4. Write a function that returns area of circle but pi value should come automatically. #Hint import math function and access pi value from there 5. Write a Python function to calculate the factorial of a number. The function accepts the number as an argument. 6. Write "help" document for the above factorial function(use doc strings) 7. Write a Python program to create a lambda function that adds 500 to a given number passed in as an argument 8. Write a Python program to create a lambda function that multiplies argument x with argument y and print the result. 9. Write lambda function that returns the odd numbers from an input list: li = [5. 7. 22, 97, 54, 62, 78, 23, 73,61] 10. Use the "map" function for the above example and print the Boolean values as an output Assignment4 (OOP) 11. Recreate all the class work with Student class instead of Car class. a. Create a student a class and student object. b. Init, self, Variables creation..etc pls repeat all the steps. 12. Inheritance: Demonstrate a scenario like various types of music like rock, blues, country, rap and pot. Recreate all the scenarios and demonstrate it
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
