# Initialize the sum variable to 0 sum_of_odd_numbers = 0
# Loop through all numbers from 0 to 10 for i in range(11): # Check if the number is odd if i % 2 != 0: # Add the odd number to the sum sum_of_odd_numbers += i
# Print the result print("The sum of all odd numbers from 0 to 10 is:", sum_of_odd_numbers)