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:
- How to Become a Machine Learning Engineers – easy Step by Step Guide
- Python Difference Between Two Lists using Python Set and Without Set
- How to Open file in python|Read File Line by Line with Examples
- Python String Find() Method Explained with Examples
- How to Generate Random Numbers in Python with Examples
Get Salesforce Answers
гѓ—гѓ¬гѓ‰гѓ‹гѓійЂљиІ©гЃЉгЃ™гЃ™г‚Ѓ – г‚ўг‚ёг‚№гѓгѓћг‚¤г‚·гѓі еЂ¤ж®µ г‚ёг‚№гѓгѓћгѓѓг‚Ї гЃЇйЂљиІ©гЃ§гЃ®иіј