J
J
john222552020-09-15 11:43:25
Python
john22255, 2020-09-15 11:43:25

Why does this code generate a Syntax Error?

good afternoon
Please tell me how to fix this code so that it works.
Why is there a Syntax Error?

def is_valid(w):
    if int(w)<1 or int(w)>100:
        return False
    else:
        return True

k = int(input()
print(is_valid(k))

Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-09-15
@john22255

int(input()
learning to count pairs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question