Sponsor Area

TextBook Solutions for Goa Board of Secondary and Higher Secondary Education Class 12 Computer And Communication Technology Computer Science With Python Chapter 10 Structure Query Language

Question 1
CBSEENCO12011543

Write the definition of a method OddSum(NUMBERS) to add those values in the list of NUMBERS, which are odd. 

Solution
def OddSum(NUMBERS):
	n=len(NUMBERS)
	s=0
	for i in range(n):
		if (i%2!=0):
			s=s+NUMBERS[i]
	print(s)
Question 4
CBSEENCO12011647

Sponsor Area