<prompt> Kutoa kamba, kuandika kazi ya kuangalia kama ni namba halali ya simu.123-456-7890  <response>: Here is a function that checks if a given string is a valid telephone number in the format XXX-XXX-XXX:pythondef isValidNumbernumber: if lennumber ! 12: return False for i in rangelennumber: if i in 3,7: if numberi ! -: return False elif not numberi.isalnum: return False return TrueGiven the input you provided: 123-456-7890, lets test the function.pythontest_input 123-456-7890result isValidNumbertest_inputprintresult Returns TrueThe function returns True which means the provided string is a valid telephone number. 