This repository contains a collection of Python programs and exercises completed as part of my first-semester coursework.
This repository includes various Python scripts created during lab sessions for Semester 1 - Introduction to Python Programming.
Each file demonstrates the implementation of key programming concepts such as:
- Variables and Data Types
- Conditional Statements
- Loops (For and While)
- Functions and Recursion
- Lists, Tuples, and Dictionaries
- File Handling
- Basic Algorithmic Thinking
- Add, remove, and display students
- Calculate average marks
- Simple file handling for storing student data
- Basic login system for teacher authentication
- Calculate the surface area given the dimensions of the prism
- Rotate letters in a string by a given number of positions using ASCII manipulation
- Generate lists of numbers that are multiples of:
- 5 and 6
- 2 and 4
- Demonstrate list slicing with user-defined start and end indexes
- Count how many times a specific character appears in a string (case insensitive)
- Simple phonebook that:
- Checks for existing contacts
- Adds new contacts with validation
- Ensures correct phone number length
- Use of
fromkeys()
andclear()
functions in Python dictionaries
- Check if a value exists in a tuple
- Convert a list into a tuple
- Read a text file
- Count and display the frequency of each alphabet character