Computer Science, asked by meeval106, 9 months ago

Write the python programme

Write a programme to display "Valid Voter" if the following condition is true: Age of the person should be greater than or equal to 18

Answers

Answered by pavithranatarajan855
25

Answer:

age=int(input())

if(age>=18):

 print("Valid Voter")

Explanation:

Hope this is helpful!

Answered by BrainlyYoda
3

age = int(input("Enter the age of person: "))

if age >= 18:

   print("Valid Voter")

else:

   print("Invalid Voter")

The above program will let you know whether the person is eligible Voter or not.

Explanation

The program takes an input from the user that is the age of the person and stores it in the variable age.

if condition in the program checks if the age is greater than equal to 18 or less than 18.

If the age is greater than equal to 18 then the program prints the statement present inside print() which is "Valid Voter"

If the age is less than 18 then the program then it skips the if condition because it's not true and moves to the else condition and prints the statement present inside print() which is "Invalid Voter"

Extra Information

Python is created by Guido van Rossum and came into existence in 1991. It is a high-level and general programming language. It is a very lucid programming language as it has a good language construct and object-oriented approach. It is dynamically typed and garbage-collected.

Similar questions