This repository contains a collection of Python scripts designed for training and advancing Python programming skills. Each script offers a hands-on exercise for learning key programming concepts, ranging from basic logic to more advanced topics, such as game development, sentiment analysis, password hashing, and more. The training covers a broad spectrum of Python use cases, providing ample opportunities to practice and improve your coding abilities.
- Age Calculator
- Calculator
- Digital Clock
- GPA Calculator
- Guess the Computer Number
- Number Guessing Game
- Odd-Even Checker
- Snake Game
- Speech Recognition
- String Analysis
- Tic-Tac-Toe vs Computer
- Bags of Words Model
- Sentiment Intensity Analyzer
- Password Hashing with Tkinter
This script allows the user to input their birthdate and calculates their current age based on the current date. This program helps you practice basic input handling, date manipulation, and conditionals.
A simple calculator that performs basic arithmetic operations such as addition, subtraction, multiplication, and division. This script helps practice implementing functions, handling user inputs, and managing basic control flow.
This script creates a simple digital clock using Python's Tkinter
library for GUI. It shows real-time updates of the current time in a graphical window, offering a good exercise for working with time and GUI elements.
A program designed to calculate a student's GPA based on their grades. This script involves loops, conditionals, and the handling of input and output, as well as basic arithmetic to determine the GPA.
In this game, the computer randomly selects a number within a specified range, and the user must guess it. This is a good script to practice loops, conditionals, and random number generation in Python.
This script allows the user to guess a randomly generated number, with feedback on whether the guess is too high, too low, or correct. It offers valuable practice for handling user inputs and implementing a game loop.
A simple script that checks whether a given number is odd or even. This program practices basic logic, user input handling, and conditionals in Python.
A classic Snake game where the player controls a snake to collect food and avoid crashing into the walls or itself. This project is an excellent practice for using Python's pygame
library to create games, handle graphics, and work with more advanced concepts such as object collision.
This script utilizes Python's speech_recognition
library to convert spoken words into text. It is ideal for learning about integrating third-party libraries, handling audio input, and performing basic natural language processing tasks.
A program that takes a string input from the user and performs various analyses such as counting characters, checking for palindromes, and more. This is a great exercise for mastering string manipulation and regular expressions in Python.
This script allows the user to play Tic-Tac-Toe against the computer. It combines basic game mechanics with AI logic for determining the computer's moves. This is an excellent script for practicing logic, recursion, and implementing simple artificial intelligence.
This script demonstrates the Bag of Words model, which is a popular text representation technique used in natural language processing (NLP). It helps convert text into a format that a machine learning model can work with. This script involves text preprocessing, tokenization, and vectorization.
This script uses the VADER Sentiment Analysis library to analyze the sentiment of a given text. It detects whether the sentiment is positive, neutral, or negative and provides a sentiment score. This is a great script for learning about sentiment analysis and integrating NLP libraries.
This script provides a graphical user interface (GUI) for securely hashing a password. It uses Python's hashlib
library for hashing and the Tkinter
library for creating the GUI. It allows users to input their password, hash it, and view the resulting hash. This script is perfect for learning about password security and GUI development.
- Python 3.6 or higher
pygame
(for Snake game)speech_recognition
(for Speech Recognition script)nltk
(for Sentiment Analysis and Bag of Words)tkinter
(for GUI-based scripts)- Other Python standard libraries (like
random
,hashlib
,pyautogui
, etc.)
To install external libraries, use the following commands:
pip install pygame
pip install SpeechRecognition
pip install nltk
-
Clone or download this repository to your local machine.
git clone https://github.com/yourusername/python-programming-training.git
-
Ensure you have Python 3.x installed.
-
Install required dependencies for specific scripts, if necessary.
-
Run any script in the terminal or command prompt by navigating to the folder and using:
python script_name.py
- Navigate to the respective Python script you'd like to practice with.
- Follow the on-screen instructions provided by the script.
- Modify the script (if desired) to enhance your understanding of Python concepts and explore new features.
- Test your understanding of Python by implementing variations of the provided scripts or building additional features.
Feel free to contribute to this repository by:
- Submitting issues or feature requests.
- Creating pull requests with code improvements or new scripts.
- Suggesting new Python projects or challenges for the repository.
This project is open-source and available under the MIT License. You are free to modify, distribute, or use the code as per your requirements.
- Special thanks to the contributors of Python's extensive documentation and tutorials, which inspired the creation of these scripts.
- Pygame for game development.
- SpeechRecognition and NLTK for providing tools for audio and text processing.