Python Program to find sum of array |

Опубликовано: 30 Октябрь 2024
на канале: learn_programming_1200
67
1

This program initializes an array my_array with the values [1, 2, 3, 4, 5]. It then initializes a variable array_sum to 0, which will be used to store the sum of the array elements. The program then loops through each element in the array using a for loop, and adds each element to the array_sum variable. Finally, the program prints the sum of the array elements using the print() function.

#short #trending #viral #python #shorts #youtubeshorts#learn_programming_1200 #coding #python #youtubeislife #subscriber #youtubeguru #youtubecontent #newvideo #subscribers #youtubevideo #youtub #youtuber #youtubevideos #programming