def addContact(self,id,name,phoneNr,group): """ Add a new contact to the database id is the contact's id name is the contact's name phoneNr id the contact's phone number group is the contacts group raise ValueError if the contact is not valid """ cr=ContactRepository() try: cr.add(Contact(id,name,phoneNr,group)) except ValueError: return False