question archive Write an algorithm and draw a flowchart to input name and age of a person and print a eligible
Subject:Computer SciencePrice:2.87 Bought7
Write an algorithm and draw a flowchart to input name and age of a person and print a eligible. If age>18else print Not Eligible along with name?
Algorithm is the step by step process of the execution of code. It is just like blue print before going to coding process.
Steps of Algorithm:
Flowchart :
Have a look at the Attachment given below.
Sample program using python language :
name = str(input("Enter the name of the person : "))
age = int(input("Enter the age of the person : "))
if age>18 :
print(name, " is Eligible")
else:
print(name, " is Not Eligible")
Input 1 :
Enter the name of the person : Ram
Enter the age of the person : 22
Output 1 :
Ram is Eligible
Input 2 :
Enter the name of the person : Lakshman
Enter the age of the person : 17
Output 2 :
Lakshman is Not Eligible
PFA