Write a function that takes as argument two lists both with the same number of elements, where each element is a number. The function must return a new list where each element of the first list is...


please someone help.


Write a function that takes as argument two lists both with the same number of elements,<br>where each element is a number. The function must return a new list where each<br>element of the first list is multiplied by two and each element of the second list is<br>added after each element of the first list. For example, if the first list will contain such<br>elements (1 234 5) and the second list (10 20 30 40 50), then the function will return this list<br>'(2 10 4 20 6 30 8 40 10 50).<br>Make sure to use a for loop in your function and explain how it works by adding short<br>comments to each line of your code. Make sure to submit the Racket file.<br>Hint: Remember to use flatten build-in function and use it on your for/list to remove nested<br>lists. Without this element, your function will return a list that will look like this: (2 10) (4 20) (6<br>30) (8 40) (10 50)). This element was explained several times.<br>

Extracted text: Write a function that takes as argument two lists both with the same number of elements, where each element is a number. The function must return a new list where each element of the first list is multiplied by two and each element of the second list is added after each element of the first list. For example, if the first list will contain such elements (1 234 5) and the second list (10 20 30 40 50), then the function will return this list '(2 10 4 20 6 30 8 40 10 50). Make sure to use a for loop in your function and explain how it works by adding short comments to each line of your code. Make sure to submit the Racket file. Hint: Remember to use flatten build-in function and use it on your for/list to remove nested lists. Without this element, your function will return a list that will look like this: (2 10) (4 20) (6 30) (8 40) (10 50)). This element was explained several times.

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here