Skip to content

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, speech recognition, and string analysis.

License

Notifications You must be signed in to change notification settings

MahmoudHanyFathalla/Python-Programming-Training-Repository

Repository files navigation

Python Programming Training Repository

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.


Table of Contents

  1. Age Calculator
  2. Calculator
  3. Digital Clock
  4. GPA Calculator
  5. Guess the Computer Number
  6. Number Guessing Game
  7. Odd-Even Checker
  8. Snake Game
  9. Speech Recognition
  10. String Analysis
  11. Tic-Tac-Toe vs Computer
  12. Bags of Words Model
  13. Sentiment Intensity Analyzer
  14. Password Hashing with Tkinter

Description

1. Age Calculator (age.py)

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.


2. Calculator (calco.py)

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.


3. Digital Clock (clock.py)

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.


4. GPA Calculator (GPA.py)

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.


5. Guess the Computer Number (guess_computer.py)

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.


6. Number Guessing Game (Guess.py)

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.


7. Odd-Even Checker (Odd-Even.py)

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.


8. Snake Game (snake_game.py)

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.


9. Speech Recognition (speech_recognition.py)

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.


10. String Analysis (string_analysis.py)

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.


11. Tic-Tac-Toe vs Computer (tic_tac_toe_vs_computer.py)

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.


12. Bags of Words Model (bags.py)

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.


13. Sentiment Intensity Analyzer (SentimentIntensityAnalyzer.py)

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.


14. Password Hashing with Tkinter (TK_hash_pass.py)

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.


Requirements

  • 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

Installation

  1. Clone or download this repository to your local machine.

    git clone https://github.com/yourusername/python-programming-training.git
  2. Ensure you have Python 3.x installed.

  3. Install required dependencies for specific scripts, if necessary.

  4. Run any script in the terminal or command prompt by navigating to the folder and using:

    python script_name.py

How to Use

  1. Navigate to the respective Python script you'd like to practice with.
  2. Follow the on-screen instructions provided by the script.
  3. Modify the script (if desired) to enhance your understanding of Python concepts and explore new features.
  4. Test your understanding of Python by implementing variations of the provided scripts or building additional features.

Contributing

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.

License

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.


Acknowledgments

  • 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.

About

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, speech recognition, and string analysis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages