Challenge: Modify the Input String
Write code to replace specific words in a string.
We'll cover the following
Write a program to convert the string:
'Light travels faster than sound. This is why some people appear bright until you hear them speak.'
into
'LIGHT travels faster than SOUND. This is why some people appear bright until you hear them speak.'
.
- Input: A string that needs to be converted.
- Output: A converted string in which specific words are replaced with other words.
Get hands-on with 1400+ tech skills courses.