A 34-year-old man committed sex acts on a bus in front of a 13-year-old schoolgirl.
David Cotton then did the same thing two days later on a prison transportation vehicle, this time in front of a female worker.
Cotton, a prisoner at Perth, appeared from custody at Dunfermline Sheriff Court.
He admitted that on July 15 during a bus journey between Lochgelly and Lochore he exposed his penis to a 13-year-old girl and masturbated.
Then on July 17 at Halbeath Road, Dunfermline, whilst travelling in a G4S prisoner transportation vehicle, he masturbated in front of a female worker who was escorting him.
Sheriff Charles Lugton called for reports and Cotton will be sentenced on December 6.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here