Question: ( a ) Create a module named area having four functions named triangle, square, rectangle, and circle, All these functions takes arguments according to their

(a) Create a module named area having four functions named triangle, square, rectangle, and circle, All these functions takes arguments according to their shape; compute and returns the area of the shape. Import the module in the main program and call the respective function depending on the user requirement and compute the area of respective shape.
(b) Discuss at-least 4 different ways to create a dictionary.
(3)
(c) Find the errors in code given below:
(2)
i) def minus(total, decrement)
(2)
output = total - decrement Ii) define check()
print(output)N= input('Enter N: ') return(output)i=3 answer =1+i****4N return answer
(d) The record of a student (Name, Roll No, Marks in five subjects and percentage of marks) is stored in the following list:
stRecord =[ Ahana', 'A-36',[56,98,99,72,69],78.8]
Write Python statements to retrieve the following information from the list stRecord.
i) Percentage of the student
ii) Marks in the fifth subject
ii) Maximum marks of the student
iv) Roll no, of the student
v) Change the name of the student from 'Ahana' to 'Aavya'
(e) Using an example, explain the significance of the init_ method.
(i) What does PIP stands for? Why is it utilized?
 (a) Create a module named area having four functions named triangle,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!