odd to the n

 avatar
unknown
python
4 years ago
229 B
8
Indexable
n = int(input("int value? "))
numbers_to_n = []
try:
    for x in range(n+1):
        if x % 2 != 0:
            numbers_to_n.append(x)
    print(f"Numbers to the n: {numbers_to_n}")
except:
    print("Error: n is not a number")
Editor is loading...