Assignment - 1- Object-Oriented Programming in Python
Assignment - 1- Object-Oriented Programming in Python
Instructions:
● Prepare a document in a Word file.
● On the first page or at the top of the document, write your full name and
roll number (Otherwise, the file will not be considered for evaluation).
● In the document, write the code for the given question, and add a
screenshot of the result. (Repeat the same for all questions provided in the
assignment.)
Tasks:
1. Write a Python program that defines a class called Rectangle. The class
should have attributes length and width, and methods to calculate the area
and perimeter of the rectangle.
2. Create a class called Student with attributes name, age, and grade.
Implement a method to display the student's information. Create an object of
the class and display the information.