Question: Function: Change the Name Create a function that accepts three parameters: originalString, originalWord, and newWord. The function should then create a new String where any
Function: Change the Name Create a function that accepts three parameters: "originalString", "originalWord", and "newWord". The function should then create a new String where any appearance of "originalWord" is replaced with the "newWord", and then return the resultant String. So if the function is called with the parameters "My name is Jeff", "Jeff", and "Smith" it should return a new string reading "My name is Smith".
Nested For Loop: Iterate through a Dictionary You have been given a Dictionary that contains a name as a Key, and a List of numbers as the Value for that Key. Create a program that uses a Nested For Loop to iterate through the Dictionary, and print the Key and the individual Values of the List to the console.
Function: No Negatives Create a Function that when given a List of numbers: 1. Will remove all negative numbers contained in the List 2. Then return a new copy of the List without negative numbers Call the Function in the code and print the value returned to prove that it works.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
