Computer Science, asked by Theuserfromnowhere, 6 months ago

Create a flowchart that reads and print your name and age

Answers

Answered by reenaagrawal
0

Answer:

Explanation:

Algorithm :

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:

Start.

Using an input function, ask the user to input the name and then store the value entered into a string variable.

Again, using the input function, ask the user to input the age of the person, and store it in an integer variable.

Write an if conditonal statement, with a condition to check whether the age inputted is greater than 18 or not.

If the condition is True, print '[Person name] is Eligible'.

Else, print '[Person name] is Not Eligible'.

End.

Flowchart :

Graphical representation of algorithm is called a 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

Output 2 :

Lakshman is Not Eligble

Similar questions