Jed1

python soln

Sep 23rd, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. class bedRoom:
  2. temp1=0
  3. pur1=0
  4. bedwash=0
  5.  
  6.  
  7. def __init__(self,temp1,pur1,bedwash):
  8. self.temp1=temp1
  9. self.pur1=pur1
  10. self.bedwash=bedwash
  11.  
  12. def getdatpass(self) :
  13. print("request is being processed ")
  14.  
  15.  
  16.  
  17. def functiondatpas(self):
  18. if self.temp1==27 :
  19. print ("Bedroom has ideal temperature ")
  20. elif self.temp1>=28 or self.temp1<=26:
  21. print ("Bedroom Temperature is not ideal ,either too low or too cold. ")
  22. print ("Please to adjust the temperature to the optimum temperature ")
  23.  
  24.  
  25.  
  26.  
  27.  
  28. # creating instance of objects
  29.  
  30.  
  31.  
  32. #calling functions
  33. temp1 = int(input("enter the temp"))
  34. pur1 = int(input("enter the purity"))
  35. bedwash = int(input("enter the bedwash"))
  36.  
  37. overalldat1=bedRoom(temp1,pur1,bedwash)
  38. overalldat1.getdatpass()
  39.  
  40. overalldat1.functiondatpas()
Advertisement
Add Comment
Please, Sign In to add comment