count even num

mail@pastecode.io avatar
unknown
plain_text
a year ago
201 B
1
Indexable
Never
a=int(input("a="))
b=int(input("b="))
count=0
if a!=0 and a<b:
    for i in range (a,b+1):
        if i % 2 == 0:
            count+=1
    print("the number of even values from a to b :", count)