Write a program to determine whether a person is eligible for voting or not

Write a program to determine whether a person is eligible for voting or not

In this program, we will learn to check person are eligible for voting or not. If a person is greater or equal to 18 years old then they are eligible for voting.

Description:

Voting for a meeting or a group such as a voter is a method to collectively decide or generally form an opinion after deliberations, debates or election campaigns. Democratic elects holders of high office by vote. Residents of the place represented by an elected official are called “constituents”, and those constituents who vote for their chosen candidate are called “voters”. There are different systems for collecting votes and find person is eligible for voting or not.

Algorithm to check whether person is eligible for voting or not

  • Step1: Start
  • Step 2: Declare the variable ‘age’ and read the age.
  • Step 3: Check Status Age = 18 or age > 18
  • Step 4: If this condition is true then that person is eligible to vote
  • Step5: Otherwise print that person is not eligible to vote
  • Step 6: End

Program to Check voting eligibility of person

age = int (input ("Enter age:"))
if (age >= 18):
print ("Person is eligible to vote")
else
print ("Person not eligible to vote")

Output:

>>> Enter Age: 25
Person is eligible to vote
>>>

Recommended Posts:

Get Salesforce Answers

Pramod Kumar Yadav is from Janakpur Dham, Nepal. He was born on December 23, 1994, and has one elder brother and two elder sisters. He completed his education at various schools and colleges in Nepal and completed a degree in Computer Science Engineering from MITS in Andhra Pradesh, India. Pramod has worked as the owner of RC Educational Foundation Pvt Ltd, a teacher, and an Educational Consultant, and is currently working as an Engineer and Digital Marketer.



Leave a Comment