Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
7 views2 pages

Shreya Python Exp 1

The document outlines a Python programming lab exercise conducted by Shreya Chauhan, focusing on various data types and operations in Python. It includes code examples demonstrating expressions, string formatting, basic math operations, lists, tuples, and dictionaries. The lab aims to enhance understanding of Python data types and their manipulation.

Uploaded by

34Shreya Chauhan
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)
7 views2 pages

Shreya Python Exp 1

The document outlines a Python programming lab exercise conducted by Shreya Chauhan, focusing on various data types and operations in Python. It includes code examples demonstrating expressions, string formatting, basic math operations, lists, tuples, and dictionaries. The lab aims to enhance understanding of Python data types and their manipulation.

Uploaded by

34Shreya Chauhan
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/ 2

Skill Lab- Python Programming ​ ​ Sem:- IV

Name: shreya chauhan Branch: SE-EXTC

Roll No: 06 Batch: B1 Date:21/01/2025

Aim: To Study Python Data-Types



Software used: - IDLE Shell 3.10.2

Code: -

#Expressions and variable #


x=7
y = 18
result = 2*(x+y)
print (result)

#using variable in string #


name = "shreya"
greeting = f"hello,{name}!"
print (greeting)

#basic maths operations#


a = 10
b=7
print ("addition", (a+b), " \nsubtraction ", (a-b), " \nproduct" ,(a*b), " \ndivision",(a/b) )

#list#
number = [1, 2, 3, 4, 5]

#accessing elements#
print (number[0])

#modifing elements#
number[1] = 10
print (number)

#adding elements#
number.append(6)
print (number)

#tuples#
coordinates = (3,4)

Name:-Shreya chauhan Roll No. :- 06 A.Y. :- 2024-25 Branch:- EXTC


Skill Lab- Python Programming ​ ​ Sem:- IV

#accessing elements#
x,y = coordinates
print (x,y)

#dictionaries
person = {"name" : "shreya","age" : 19,"city" : "mumbai"}

#accessing values
print (person["name"])

#modifying values
person["age"] = 20
print (person)

#adding new key-value pairs


person["gender"] = "Female"
print (person)

Output: -

Name:-Shreya chauhan Roll No. :- 06 A.Y. :- 2024-25 Branch:- EXTC

You might also like