#the original paragraph paragraph = "Earth is the third planet from the Sun and the only astronomical object known to harbour and support life. About 29.2% of Earth's surface is land consisting of continents and islands. The remaining 70.8% is covered with water, mostly by oceans, seas, gulfs, and other salt-water bodies, but also by lakes, rivers, and other freshwater, which together constitute the hydrosphere. Much of Earth's polar regions are covered in ice. Earth's outer layer is divided into several rigid tectonic plates that migrate across the surface over many millions of years, while its interior remains active with a solid iron inner core, a liquid outer core that generates Earth's magnetic field, and a convective mantle that drives plate tectonics." #split the paragrah into an array of STRINGs wordArray = paragraph.split() #display the array print("wordArray") #initialise variables to store the odd and even count oddcount = 0 evenCount = 0 #use a count-controlled loop to process the array for i in range(wordArray): #determine if the length of the current word in the array is even or odd length if wordArray%2==0: evenCount = evenCount+1 else: oddCount = oddCount + 1 #calculate percentages oddPercentage = round((oddCount/len(wordArray))*100,0) evenPercentage = round((evenCount/len(wordArray))*100,0) print(f"Odd length words: {oddPercentage}% ; Even length words: {evenPercentage}%")