user
Given a list of numbers, 1-10, write a program to determine the sum of the odd numbers.


assistant
list_of_numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

# Initialize the variable which stores the sum
sum_of_odd_numbers = 0

# Iterate through the list
for num in list_of_numbers: 
    # Check for odd numbers
    if num % 2 != 0: 
        # Add odd numbers to the variable
        sum_of_odd_numbers += num

# Print the sum of odd numbers
print(sum_of_odd_numbers)