Throttle won't depress on 2000 Toyota RAV4

My gas pedal won't depress at times. Sometimes I have to put it in neutral and press a bit hard on the pedal to get it to depress. When I do this, it eventually will depress. This appears to be a safety problem.Took it to a mechanic who wants to replace the throttle cable. I am wondering if there is some kind of sensor/computer chip that may be malfunctioning. What can make the throttle stick? Thanks for your time.

1 answer
What typically happens is the Throttle Body gets filled with carbon and then the throttle will stick. This can some times ruin the cable, so a cable may be needed, but first, make sure that the bore if the Throttle Body us really clean. I know of NO sensor/ computer issue on your vehicle that would ever do this, and I have worked on a lot of these vehicles.