Professional Documents
Culture Documents
Untitled PDF
Untitled PDF
Untitled PDF
1)Write a program to create a class called Point with two attributes x and y.
Write following functions and demonstrate the working of these functions by creating suitable objects.
2)Write a program to create a class called Rectangle with the help of a corner point, width and height.
3) Create and print a Point object, and then use id to print the object’s unique identifier. Translate the hexadecimal form into decimal and confirm that they match.
4) Write a Python class named Circle constructed by a radius and two methods which will compute the area and the perimeter of a circle.
6) Write a Python class named Rectangle constructed by a length and width and a method which will compute the area of a rectangle.
7) Write a Python class which has two methods get_String and print_String. get_String accept a string from the user and print_String print the string in upper case.