Finish attempt Write a function double_up(numbers) which takes a list as a parameter and doubles the value of each eleme
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Finish attempt Write a function double_up(numbers) which takes a list as a parameter and doubles the value of each eleme
Finish attempt Write a function double_up(numbers) which takes a list as a parameter and doubles the value of each element in the list. Note that the list is changed in place. The function does not return a new list. For example, if the original list is: [4, 21, 55, 2, 7] then the list will be changed to: [8, 42, 110, 4, 14] For example: Result Test [2, 8, 10, 18, -4, -20) ['atat', 'oror', anyany'] numbers = [1, 4, 5, 9, -2, -10] double_up(numbers) print(numbers)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!