Answer to Question #238824 in Python for Sourav

Question #238824
Victor has an array of size and he loves to play with the sun and numbers each time he play with them he pics of any two consecutive number and Odd then on adding both the number it cost him ke into some of both numbers find the minimum cost of adding all the numbers in array in python3
1
Expert's answer
2021-09-18T14:07:32-0400
def Sum(arr, n):
    sum1 = 0;
    for i in range(len(arr)-1):
        sum1 = arr[i] + arr[i + 1]
        print (sum1, end = " ")
     
list1 =[1, 2, 3, 4, 5]
n = len(list1)
Sum(list1, n)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS