lundi 26 avril 2021

Why isn't my if/else statment working in my range? (python)

start = int(input("Enter your starting value "))
end = int(input("Enter your ending value "))
inc = int(input("Enter your increment value "))

inc = int(input("Enter your increment value "))
for j in range (start,end,inc):
    if start > end:
        print("Nothing to show here!")
    else:
        print(j)

Instead of outputting "Nothing to show here!" as it should, it just outputs the end value instead. It works perfectly fine otherwise, but I want to know why it doesn't output my quote.

Aucun commentaire:

Enregistrer un commentaire