B02C-2019S – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  

Login
[lwa]



Exam Questions-CBSE12A-2019-B02C #PYTHON#7109    siteicon   siteicon  

Problem Statement - B02C-2019S

Define a class House in Python with the following specifications:

Instance Attributes

-Hno              #House Number

-Nor              # Number of Rooms

-Type           # Type of the House

Methods/function

-AssignType()    # To assign Type of House

# based on Number of Rooms as follows :

 

Nor Type
<=2 LIG
==3 MIG
>3 HIG

– Enter()     # To allow user to enter value of

# Hno and Nor. Also, this method should

# call Assigntype() to assign Type

– # To display Hno, Nor and Type.

Solution

TC++ #7109


Share

CSKC| Created: 11-Apr-2019 | Updated: 11-Apr-2019|CBSE12A-2019









Back