Пример кода суммы первых n нечетных чисел с использованием для цикла

def OddSummation(n):
    total = 0
    for i in range(1,n,2):
        total+=i
    return total
    
    
def main():
    number = int(input("Enter the number: "))
    print("The summation of all the odd numbers between 1 and ",number, " is ",         OddSummation(number))
    
main()
Outrageous Ostrich