what possible functions could be petals & sepals serve
Sepals serve the purpose of protection at the time of bud stage from infection or any other harm to the flower from any external agent and also serves the purpose of providing starch to the flower by the process of photosynthesis.
Petals are sometimes very colourful and also scented so as to attract insects or any other creatures towards them so that these creatures become the medium for the transfer of pollen grains from anther to stigma which will result in fertilisation.