Write a program in Python to calculate and display the sum of all odd numbers in the list
Answers
Answer:
- #Python program to find sum of odd and even numbers in a list.
- NumList=[] #empty list.
- evenSum=0 #declare and initialised variable evenSum to sum of even numbers.
- oddSum=0 #declare and initialised variable oddSum to sum of odd numbers.
- Number=int(input("Please enter the total number of list elements: "))
hope it help mark me brainliest
Answer:
Program 1
Program 1#Python program to find sum of odd and even numbers in a list.
Program 1#Python program to find sum of odd and even numbers in a list.NumList=[] #empty list.
Program 1#Python program to find sum of odd and even numbers in a list.NumList=[] #empty list.evenSum=0 #declare and initialised variable evenSum to sum of even numbers.
Program 1#Python program to find sum of odd and even numbers in a list.NumList=[] #empty list.evenSum=0 #declare and initialised variable evenSum to sum of even numbers.oddSum=0 #declare and initialised variable oddSum to sum of odd numbers.
Program 1#Python program to find sum of odd and even numbers in a list.NumList=[] #empty list.evenSum=0 #declare and initialised variable evenSum to sum of even numbers.oddSum=0 #declare and initialised variable oddSum to sum of odd numbers.Number=int(input("Please enter the total number of list elements: "))