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

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

Ge3171 Python Lab Programs Batch 2 Afternoon

The document contains various Python programs demonstrating the use of lists, tuples, dictionaries, and conditional statements. It includes examples for creating, appending, and removing elements from lists, working with tuples, manipulating dictionaries, finding the largest of three numbers, and converting temperatures between Celsius and Fahrenheit. Additionally, it mentions identifying and solving real-life problems and developing flow charts for various applications.

Uploaded by

talentpro006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Ge3171 Python Lab Programs Batch 2 Afternoon

The document contains various Python programs demonstrating the use of lists, tuples, dictionaries, and conditional statements. It includes examples for creating, appending, and removing elements from lists, working with tuples, manipulating dictionaries, finding the largest of three numbers, and converting temperatures between Celsius and Fahrenheit. Additionally, it mentions identifying and solving real-life problems and developing flow charts for various applications.

Uploaded by

talentpro006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Write a python program to create, append and remove lists in python

my_list=[]

my_list.append(10)

my_list.append(20)

my_list.append(30)

print(my_list)

my_list.remove(20)

Write a program to demonstrate working with tuples in python.

my_tuple =(1,2,3,4,5)

print(“Tuple Elements:”)

for element in my_tuple:

print(element)

print(“First element”, my_tuple[0])

print(“Last element”,my_tuple[-1])

print(“Sliced tuple:”,my_tuple[2:4])

print(len(my_tuple))

tuple1=(1,2,3)

tuple2=(4,5,6)

concatenated_tuple=tuple1+tuple2

a,b,c=(7,8,9)

print(“a=”,a)

print(“b=”,b)

print(“c=”,c)

Write a program to demonstrate working with dictionaries in python

my_dict={“name”:”John”,”age”:25,”city”:”New York”}

for key,value in my_dict.items():

print(value)

print(my_dict[“name”]

print(my_dict[“age”]
print(my_dict[“city’])

my_dict[“age”]=26

print(my_dict[“age”])

my_dict[“Occupation”]=”Engineer”

print(my_dict[“occupation”])

del my_dict[“city”]

print(my_dict)

print(len(my_dict))

Write a python program to find largest of three numbers

num1 = 10

num2 = 14

num3 = 12

if (num1 >= num2) and (num1 >= num3):

largest = num1

elif (num2 >= num1) and (num2 >= num3):

largest = num2

else:

largest = num3

print("The largest number is", largest)

Write a python program to convert temperature to and from Celsius to Fahrenheit

celsius = int(input("Enter the Temperature in Celsius :\n"))

fahrenheit = (1.8 * celsius) + 32

print("Temperature in Fahrenheit :", fahrenheit)


Refer Lab record

Identification and solving of simple real life or scientific or technical problems, and developing flow
charts for the same. (Electricity Billing, Retail shop billing,)

Identification and solving of simple real life or scientific or technical problems, and developing flow
charts for the same. (, Sin series, weight of a motorbike, Weight of a steel bar)

Identification and solving of simple real life or scientific or technical problems, and developing flow
charts for the same. (compute Electrical Current in Three Phase AC Circuit, etc.)

Write a Python programming using simple statements and expressions (exchange the values of two
variables, distance between two points).

Write a python program to Python programming using simple statements and expressions (circulate
the values of n variables, distance between two points

Write a python programming for Scientific problems using Conditionals and Iterative loops. (Number
series, Number Patterns)

Write a python programming for Scientific problems using Conditionals and Iterative loops. (pyramid
pattern)

Write a python program to Implementing real-time/technical applications using Lists, Tuples(Items


present in a Library)

Write a python program to Implementing real-time/technical applications using Lists,


Tuples(Components of a car)

Write a python program to Implementing real-time/technical applications using Lists, Tuples, (Materials
required for construction of a building –operations of list & tuples).

Write a python program to Implementing real-time/technical applications using Lists, Tuples. (word
count,Longest number)

You might also like