AI-LabPrograms (1 To 5)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Program 1

Objective: Printing 5 lines.

Task: Print 5 lines about yourself using print () function.

Code:

Output:
Program 2
Objective:Use input() and print()

Task: Accept name and age from the user and display them

Code:

Output:
Program 3
Objective: Use arithmetic operators

Task: To accept the side of a square and display the area of the square

Code:

Output:
Program 4
Objective: Use of arithmetic operators

Task: To accept the radius of a circle and calculate its area and perimeter

Code:

Output:
Program 5
Objective: Use of arithmetic operators

Task: To accept two numbers and display their sum and product

Code:

Output:

You might also like