0% found this document useful (0 votes)
47 views3 pages

Experiment 1 Python

The document outlines a Python programming assignment for the student Abhishek Pal, focusing on developing programs for personalized greetings and calculating areas of geometric figures. It includes problem statements, sample code, and outputs for each task. The conclusion highlights the student's understanding of programming constructs transitioning from C to Python.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views3 pages

Experiment 1 Python

The document outlines a Python programming assignment for the student Abhishek Pal, focusing on developing programs for personalized greetings and calculating areas of geometric figures. It includes problem statements, sample code, and outputs for each task. The conclusion highlights the student's understanding of programming constructs transitioning from C to Python.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Department of Humanities and Applied Science

Academic Year: 2024-25 Name of Student:Abhishek Pal


Semester: II Student ID:24107084
Class / Branch: F.E Div I1 Date of Performance:22/01/2024
Subject: Python Programming Date of Submission:08/02/2024
Name of Instructor: Prof. Pravin SIR
Experiment No.1

Problem Statement1: : To develop a Python program that generates a personalized greeting based on
user input, enabling a better understanding of Python’s basic constructs and their comparison with
equivalent constructs in python
Design and implement a Python program that:
1. Prompts the user to enter their name and preferred greeting style.
2. Outputs a personalized greeting message using the input values.

Program:
1.

print("__Greeting message ____________")

print(" HELLO Welcome tp python programming\n")

print(" It is easy to do code in python")

first_name = "Radha"

last_name = input ("Enter last name:")

age = int(input("Enter age:"))

print(f"My name is {first_name} {last_name} and I am {age} years old.")

print("My name is ",first_name," ",last_name,"and I am ",age, "years old.")


Output:

Problem Statement 2: Calculating Areas of Geometric Figures* - Write a python program to calculate areas of
any geometric figures like circle, rectangle and triangle.

Program:

Radius = int(input("radius of circle"))

c = Radius*Radius*3.14

print("Area of circle is :",c)

b = int(input("Enter value of base of triangle:"))

h = int(input("Enter value of height of triangle:"))

d = b*h*0.5

print("Area of triangle is :",d)

x = int(input("Enter value of base of reactangle:"))

y = int(input("Enter value of height of reactangle:"))

z = x*y

print("Area of reactangle:",z)

Output:
Conclusion: : Understood the basic programming constructs from C to Python by focusing on Python's syntax
and input/output functions.

You might also like