exercises cwrite function mystruct(textthat counts the number of certain structure in the string text the structure is defined as followed by or until double gg perform manual search for the structure too to control the computations by mystruct filenamecount_substrings py remarks you are supposed to solve the tasks using simple programming with loops and variables while aand bare quite straightforwardcquickly involves demanding logic howeverthere are powerful tools available in python that can solve the tasks efficiently in very compact codeatext count(letter)/float (len(text))btext count(letter* )clen(re findall(' [at]+?gg'text)that isthere is rich functionality for analysis of text in python and this is particularly useful in analysis of gene sequences open access this is distributed under the terms of the creative commons attributionnoncommercial international license (which permits any noncommercial useduplicationadaptationdistribution and reproduction in any medium or formatas long as you give appropriate credit to the original author(sand the sourcea link is provided to the creative commons license and any changes made are indicated the images or other third party material in this are included in the work' creative commons licenseunless indicated otherwise in the credit lineif such material is not included in the work' creative commons license and the respective action is not permitted by statutory regulationusers will need to obtain permission from the license holder to duplicateadapt or reproduce the material