Skip to content

LavanuruRohithRoy/Python-PreIntern-tasks

Repository files navigation

Python Internship Projects

This repository contains a collection of console-based Python projects developed as part of an internship learning track.
Each task is designed to strengthen core Python fundamentals through practical, real-world problem solving.

The projects are implemented incrementally, following a clear and structured development flow.


Task 01 – To-Do List Application

Description:

A console-based task management application that allows users to manage daily tasks efficiently.
The program provides options to add new tasks, view existing tasks, update task details, and remove completed tasks through a menu-driven interface.

The project focuses on organizing logic in a clean and readable manner while simulating a basic real-world application workflow.

Key Concepts Covered:

  • Conditional statements
  • Loops
  • Lists and dictionaries
  • User input handling
  • Function-based modular design
  • Basic object-oriented concepts
  • Separation of data, logic, and user interaction

Task 02 – Guess the Number Game

Description:

A console-based number guessing game designed to reinforce Python fundamentals through an interactive experience.
The program randomly generates a number within a defined range, and the user attempts to guess it.

Based on the user's input, the game provides feedback indicating whether the guess is too high or too low.
The application tracks the number of attempts, enforces a maximum guess limit, and allows the user to replay the game.

Special attention is given to handling real-world user input scenarios where input may contain non-numeric characters.

Key Concepts Covered:

  • Random number generation
  • Loops (while)
  • Conditional statements (if / elif / else)
  • User input validation
  • String processing
  • Function-based program structure
  • Program entry point using main() and __name__ == "__main__"

Task 03 – File Handling and Text Processing

Description:

A Python-based program that demonstrates basic file handling operations by reading data from a text file, performing word search and replacement, and saving the updated content back to the file. The application includes proper exception handling to manage file-related errors gracefully while ensuring reliable and consistent text processing.

The task emphasizes practical usage of file I/O, string manipulation, and error handling in a clean and readable implementation.git

Key Concepts Covered:

  • File input and output operations
  • Reading from and writing to text files
  • String manipulation and text replacement
  • Case-insensitive text processing
  • Exception handling for file-related errors
  • Dynamic file path handling
  • Modular function-based program structure

Task 04 – Basic Web Scraper

Description

A console-based Python application that scrapes and displays news headlines from a predefined website.

The program sends an HTTP request to fetch webpage content, parses the HTML structure, extracts relevant data, and presents it in a readable format. This task focuses on understanding web scraping fundamentals and working with real-world HTML data.

Initial Setup

  • Install required dependencies:

  • Run the scraper script from the terminal

Program Flow

  1. Send an HTTP request to the target website
  2. Receive and validate the response
  3. Parse the HTML content using Beautiful Soup
  4. Locate relevant HTML elements containing headlines
  5. Extract and store the text data
  6. Display the extracted information in a formatted console output

Tools and Libraries Used

  • Python
  • Requests
  • Beautiful Soup (bs4)

Key Concepts Covered

  • Web scraping fundamentals
  • HTTP request handling
  • HTML parsing basics
  • Data extraction techniques
  • Error handling
  • Function-based modular design

Conclusion

This task demonstrates how Python can be used to scrape and process data from web pages while maintaining clean structure, readability, and safe scraping practices.


Task 05 – Currency Converter

Description

A console-based Python application that converts an amount from one currency to another using exchange rate data.

The program focuses on understanding how real-world API-based systems are structured by separating user interaction, data sourcing, and core conversion logic. Exchange rates are mocked to simulate an external API, keeping the task cost-free while preserving realistic architecture and data flow.


Initial Setup

  • No external APIs or API keys required
  • No third-party libraries needed
  • Run the script directly using Python

Program Flow

  1. Accept currency codes and amount from the user via CLI
  2. Validate user input for correctness and safety
  3. Retrieve exchange rate data from a data provider layer (mocked API)
  4. Convert the amount using a common base currency (USD)
  5. Calculate the final converted value using core mathematical logic
  6. Display the result in a clear, readable format

Tools and Libraries Used

  • Python (standard library only)

Key Concepts Covered

  • API-style data consumption (mocked external service)
  • Request–response style data flow
  • Input validation and error handling
  • JSON-like structured data usage (dictionary-based)
  • Currency conversion mathematics
  • Separation of concerns within a single-file program
  • Clean, testable core logic design

Conclusion

This task demonstrates how a simple utility can be designed using real-world architectural thinking. By isolating core logic from data sources and user interaction, the program remains easy to understand, test, and extend—laying a strong foundation for integrating real APIs or scaling into larger systems later.

Task 06 – Word Count & Frequency Analysis Tool

Description

A console-based Python application that reads a .txt file and analyzes its content.

The program calculates the total number of lines, words, and characters in the file. It also performs word frequency analysis to identify the most commonly used words.

The architecture separates file handling, text processing, and result presentation to maintain clean structure and clarity.


Initial Setup

  • No third-party libraries required
  • Uses only Python standard library
  • Place .txt files in the same directory as the script
  • Run directly using Python

Program Flow

  • Detect available .txt files in the directory
  • Allow user to select a file via CLI
  • Read file safely using context manager
  • Count lines, words, and characters
  • Normalize text (lowercase + remove punctuation)
  • Generate word frequency distribution
  • Sort and display top frequent words
  • Present results in a structured report format

Tools and Libraries Used

  • Python (standard library only)
  • os for file detection
  • string for text cleaning
  • collections.Counter for frequency analysis

Key Concepts Covered

  • File Input/Output handling
  • String manipulation and tokenization
  • Dictionary-based data aggregation
  • Sorting and structured output formatting
  • Modular function design (separation of concerns)

Conclusion

The tool produces a clear analytical summary of the text file, demonstrating practical file handling, text preprocessing, and basic data analysis using core Python concepts.


Notes

  • All projects are intentionally console-based to emphasize core logic over user interface design.
  • The code prioritizes clarity, readability, and maintainable structure.
  • Each task builds progressively on concepts introduced in previous tasks.

About

python developer pre-Intern tasks

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages