Question: Answer the following: 1. a. Write a function that has two parameters. Assuming that these parameters will be filled with the id values of two
Answer the following:

1. a. Write a function that has two parameters. Assuming that these parameters will be filled with the id values of two paragraphs, the function should put 'sumwalt' as the text in the first paragraph, and 'csce102' as the text for the second paragraph. (30pts) b. Fill in the blank to call the function from part a, to change text of the paragraph with id of 'pi'to 'sumwalt' and text of the paragraph with id of 'p2' to 'csce102. (10pts)
Text for para 1
Text for para 2
C. Fill in the blank to call the function from part a, to change text of the paragraph with id of 'p3'to 'sumwalt' and text of the paragraph with id of 'p4' to 'csce102'. (10pts)
Text for para 3
Text for para 4
2. a. Write the code for a function that has two parameters. Assuming that the first parameter will be filled with the id value of a paragraph, and the second one will be filled with a color value, the function should change the background color of the paragraph to the color value. (30pts) b. Fill in the blank to call the function from part a, to change the background color of the paragraph with id of 'pi' to 'red', and the background color of the paragraph with id of 'p2' to 'blue. Hint: you need to call the function twice. (20pts)
Text for para 1
Text for para 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
