[Python] How to print 100 values which are divisible by 3 and 5?

Discussão em 'Python' iniciado por Stack, Junho 25, 2025.

  1. Stack

    Stack Membro Participativo

    lower = int(input("Enter lower range limit:"))
    upper = int(input("Enter upper b range limit:"))
    Count = 0
    for i in range(lower, upper+1):
    if((i%3==0) & (i%5==0)):
    Count += 1
    print(count)


    I want to print 100 values which are divisible by 3 and 5, but in count only 7 is showing, can anyone suggest what to do, it will be appreciated!

    Continue reading...

Compartilhe esta Página