結果 : define a function called range function which takes three parameters