Page 1 of 1

Write a Python program that performs two functions on a given string: 1. Counts and outputs the number of time the word

Posted: Mon May 09, 2022 7:17 am
by answerhappygod
Write A Python Program That Performs Two Functions On A Given String 1 Counts And Outputs The Number Of Time The Word 1
Write A Python Program That Performs Two Functions On A Given String 1 Counts And Outputs The Number Of Time The Word 1 (57.11 KiB) Viewed 22 times
Write a Python program that performs two functions on a given string: 1. Counts and outputs the number of time the word "the" occurs in the string; 2. Finds the longest word in the string and outputs it and its length. For instance, the string could be string 1 = "China is one of the fastest-growing economies in the world. China is looking for more investments around the world. Also, the whole world is looking at China as a great economic power. Most of the Chinese can foresee the heights that China is capable of reaching."