SquareEachnums function nums is a list of numbers The functi

SquareEach(nums) function, nums is a list of numbers. The function modifies the list by squaring each entry. The function returns None. Test your solution using the following test() function: def test(): nums = list(range(15)) squareEach(nums) print(nums) test() When correctly implemented, the test() function will print: [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196]

Solution

Answer:

#include<stdio.h>

#include<conio.h>

#include<string.h>

void main()

{

clrscr();

int a,i,k;

printf(\"enter range=\");

scanf(\"%d\",&a);

for(i=1;i<=a;i++)

{

k=i*i;

printf(\"%d \",k);

}

getch();

}

 SquareEach(nums) function, nums is a list of numbers. The function modifies the list by squaring each entry. The function returns None. Test your solution usin

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site