🐍
B.TECH I YEAR • II SEMESTER

Python Programming - Lab Manual

R25 Lab Manual • Python Programming Practice Programs

LAB MANUAL

Python Programming Lab Programs

This section contains 36 Python Programming laboratory programs for B.Tech I Year II Semester under R25 Regulation. Select any program to view its complete solution.

🐍

Python Basics

7 Programs
01

I. Use a web browser to go to Python website http://python.org; II. Start Python interpreter and type help()

View Solution →
05

Write a Python program to print the following triangle pattern: 5, 4 4, 3 3 3, 2 2 2 2, 1 1 1 1 1

View Solution →
06

Write a Python program to check whether a character is a digit, lowercase, uppercase or special character using if-else-if

View Solution →
07

Write a Python program to print prime numbers in an interval using break

View Solution →
📋

Arrays, Lists and Tuples

6 Programs
03

Write a Python program to define a function to check whether a list is a palindrome

View Solution →
04

Write a Python program to define an is_sorted function to check whether a list is sorted

View Solution →
05

Write a Python program to define a has_duplicates function to check whether a list contains duplicates

View Solution →
06

Write a Python program to define a remove_duplicates function to remove duplicate values from a list

View Solution →
🔤

Strings and Dictionaries

5 Programs
01

Write a Python program to add "I", "a" and an empty string to a word list containing single-letter words

View Solution →
03

Write a Python program to add comma between characters. Example: Apple → A,p,p,l,e

View Solution →
04

Write a Python program to remove a given word from all places in a string

View Solution →
05

Write a Python program to capitalize the first letter of each word and convert the remaining letters to lowercase without using built-in functions

View Solution →
🔢

Recursion and Matrices

3 Programs
01

Write a recursive Python function to generate all binary strings of n-bit length

View Solution →
🧩

Modules, Exceptions and Classes

6 Programs
01

Write a Python program to create a module with examples of geometric shapes and operations

View Solution →
02

Write a Python program to demonstrate exception handling for all general-purpose exceptions

View Solution →
04

Write a Python program to add a color attribute to Rectangle and modify draw_rectangle

View Solution →
06

Write a Python program to create a Circle class and implement draw_circle

View Solution →
📁

Validation and File Handling

5 Programs
01

Write a Python program to read phone number and email address and validate them

View Solution →
03

Write a Python program to open a file, check whether given words are present and display them when found

View Solution →
04

Write a Python program to read a text file and find the word with the most occurrences

View Solution →
05

Write a Python program to find file statistics such as words, vowels, blanks, lowercase letters and uppercase letters

View Solution →
⚙️

Python Libraries, Logic Gates and GUI

4 Programs
03

Write a Python program to implement Digital Logic Gates: AND, OR, NOT and EX-OR

View Solution →
04

Write a Python GUI program to create a wizard window with two text labels, two text fields, Submit and Reset buttons

View Solution →