Q50.Consider the procedure below, where `aList` is a list of integers. Which options are correct at the end of execution?
```
procedure cumulative(aList)
sum = 0, cumulList = []
foreach element in aList {
sum = sum + element
cumulList = cumulList ++ [sum]
}
return(cumulList)
end cumulative
```
Save
Check
Details
Q50
20 Nov 2022
Q50.Consider the procedure below, where `aList` is a list of integers. Which options are correct at the end of execution?
```
procedure cumulative(aList)
sum = 0, cumulList = []
foreach element in aList {
sum = sum + element
cumulList = cumulList ++ [sum]
}
return(cumulList)
end cumulative
```