election eligibility in python

main.py
def check_election_eligibility(age):
    if age >= 18:
        return "You are eligible to vote in the elections."
    else:
        return "You are not eligible to vote in the elections."

# Example usage
age = 20
result = check_election_eligibility(age)
print(result)
270 chars
11 lines

related categories

gistlibby LogSnag