I'm not a specialist myself, but I would have add an additional method (see
def getPlant
here after) to get the plant name and to check if it is the same as the input string.class Plant: def __init__(self,name,family,water_level,ph,sunlight,fertilizer): self.name=name self.family=family self.water_level=water_level self.ph=ph self.sunlight=sunlight self.fertilizer=fertilizer def watering(self): if self.water_level=="Light": print("WATERING....DONE") elif self.water_level=="Medium": print("WATERING...WATERING...DONE") elif self.water_level=="Heavy": print("WATERING...WATERING...WATERING...DONE") else: print("INVALID INPUT") def plant_info(self): print(self.name, " is a ",self.family," and has ",self.water_level," watering requirements, ", self.ph," PH Level"," and needs ",self.sunlight,"sunlight and a",self.fertilizer,"fertilizer") def getPlant(self): return self.name Pepper=Plant('Pepper','Solanaceae', 'Medium','6.0','Bright','13-13-13') Tomatoe=Plant('Tomatoe','Solanaceae', 'Medium','6.0','Bright','13-13-13') Broccoli=Plant('Broccoli','Brassicaceae', 'Light','5.5', 'Partial Sun','13-10-10') Plants=[] Plants.append(Pepper) Plants.append(Tomatoe) Plants.append(Broccoli) Plant_selection=input("PLEASE INPUT PLANT: ") for p in Plants: if (Plant_selection.lower() == p.getPlant().lower()): p.plant_info()