I code only print of odd nummbers in 1 to 10 numbers using for loop, i trying to find this between odd numbers total count example:
This is my code
for Number in range(1,11):
if(Number%2==1):
print(Number)
I tyring different method of find the Number Variable in total count values, but not working
count = 0
for Number in range(1,11):
if(Number%2==1):
count = count + 1
print(count)
for a in range(1,11):
if(a%2==1):
print(range(a))
for a in range(1,11):
if(a%2==1):
print(range(a,6))
New contributor