Department of Applied Sciences
LAB FILE
SUBJECT: Programming for Problem Solving using Python
(25C1CSU-112)
B. Tech. 1st Year
2025-2026
Chandigarh Engineering College-CGC
Landran, Mohali-140307
Name: Ritik
Branch: ECE A2
Roll no.: CEC252076
Index
Sr. No Experiment Name Date Page Signature
No
a) Install and configure Python IDE.
b) Write a Python program to display messages on screen.
1
c) Write a Python program to input a string from a user and display it
on the screen.
a) Write a program to check whether entered frequency is radio
frequency or audio frequency.
b) Write a program to display various radio frequency bands using
2
if..else if ladder.
c) Write a program to display resistor color code using a switch
statement.
a. Write a simple Python program to demonstrate use of control
loops:
i) while
ii) do while
3
b. Create a simple program, to demonstrate use of: for loop in Python
(e.g.: various pattern building, printing multiplication table, checking
palindrome number etc.)
Write Python program to perform following operations on List:
a) Create b) Access c) Update d) Delete elements from list.
4
Develop Python program to perform following operations on Tuples:
5. a) Create b) Access c) Update d) Delete Tuple elements
Write Python program to perform following operations on Set:
6.
a) Create b) Access c) Update d) Delete Access Set elements
Create a program to perform following operations on Dictionaries in
Python:
7 a) Create b) Access c) Update d) Delete e) Looping through
Dictionary
a) Create a python program to demonstrate use of math built-in
function.
8 b) Create a python program to demonstrate the use of string built-in
function.
Write a program to define a function with default arguments.
9
Write Python Program to Count the Number of words and lines in a
Text File.
10
Write Python Program to Read a String from the User and Append it
into a File.
Create an array using NumPy.
11 Find the dimension of the array using NumPy inbuilt methods.
Write Python program to create Widgets using Tkinter.
12