Question

What will be the value of `x` after the following pseudo-code execution?  ```     x = 0     data = [10, 20, 30]     for item in data:         if item > 15:             x = x + item         else:             x = x - item     ```

A 40
B 20
D 60
Practice Next

Hey! Ask a query