Write a function countmy( )in Python to read the text file "DATA.TXT" and count the number of times "my" occurs in the file. For example if the file "DATA.TXT" contains: "This is my website. I have displayed my preferences in the CHOICE section." The countmy( ) function should display the output as: "my occurs 2 times".
A text file “Quotes.Txt” has the following data written in it: "Living a life you can be proud of Doing your best Spending your time with people and activities that are important to you Standing up for things that are right even when it’s hard Becoming the best version of you." Write a user defined function to display the total number of words present in the file.