Computer Science, asked by ravi7424, 8 months ago

Currently, processArray does not modify the array. You have to change this program so that any number in the array is replaced by -1 if it divisible by 7, with -2 if it is greater than 100, and with -3 if it is divisible by 7 and greater than 100. To do this, you have to put your code inside processArray. Do not change anything else in the program.

Answers

Answered by rohitkhajuria90
1

Code is in python

input array is replaced by the given conditions

[63,105,150]

Output is

[-1,-3,-2]

HOPE THIS IS WHAT YOU EXPECTED AND WILL HELP YOU.

Attachments:
Similar questions