WAP TO INPUT THE NAME AND AGE OF A PERSON AS A PARAMETER AND DISPLAY WHETHER HE IS ELIGIBLE TO VOTE OR NOT.
Answers
Answered by
4
def can_vote(name, age):
if int(age) >= 18:
return f"{name} can vote!"
return f"{name} can't vote!"
name, age = [x for x in input("enter name & age: ").split()]
print(can_vote(name, age))
Answered by
0
Explanation:
def can_vote(name, age):
if int(age) >= 18:
return f"{name} can vote!"
return f"{name} can't vote!"
name, age = [x for x in input("enter name & age: ").split()]
print(can_vote(name, age))
Similar questions
Math,
2 months ago
Math,
6 months ago
India Languages,
11 months ago
English,
11 months ago
Chemistry,
11 months ago