w3resource

100 Python Projects for Beginners with solutions

Python Beginners Projects

Explore the world of Python programming with these engaging beginner projects! From classic games like Hangman and Tic-Tac-Toe to practical tools like a Password Manager and Currency Converter, these projects cover a diverse range of topics. Whether you're interested in building web applications, games, or utilities, these hands-on projects provide a fun and educational way to enhance your Python skills. Choose a project that sparks your interest and dive into the exciting journey of coding!

Soon, we will add solutions for every project.

You may read our Python tutorial and practice 3000+ Python exercises before solving the following projects

1.
Hello World: A classic first project; print "Hello, World!" to the console.

Input: None

Output: Hello, World!

Solutions

2. Calculator:

Input: User provides two numbers and selects an operation (addition, subtraction, multiplication, division).

Output: The result of the chosen operation.

Input values:

Enter the first number: 5

Enter operation (+, -, *, /): +

Enter the second number: 3

Output value: Result: 8

Solutions

3. Guess the Number Game: Make a game where the computer generates a random number, and the player has to guess it.

Input values:

Player guesses the randomly generated number.

Output value:

Feedback on whether the guess is correct, too high, or too low. Repeat until the correct number is guessed.

Example:

Input values:
Enter your guess: 7
Output value: Too low! Try again.
Input values: Enter your guess: 12
Output value: Too high! Try again.
Input values: Enter your guess: 10
Output value: Correct! You guessed the number.

Solutions

4. To-Do List Application: Build a basic to-do list application where users can add, edit, and delete tasks.

Input values:

User interacts with the application through commands to add, edit, or delete tasks.

Output value:

Updated the to-do list based on user actions.

Example:

Input values:

1. Add Task
2. Edit Task
3. Delete Task
4. Exit
Select an option: 1 Enter task: Buy groceries
Output value: Task added successfully.
Input values: 1. Add Task 2. Edit Task 3. Delete Task 4. Exit
Select an option: 2 Enter task index to edit: 1 Enter new task: Buy weekly groceries
Output value: Task edited successfully.
Input values: 1. Add Task 2. Edit Task 3. Delete Task 4. Exit
Select an option: 3 Enter task index to delete: 1
Output value: Task deleted successfully.
Input values: 1. Add Task 2. Edit Task 3. Delete Task 4. Exit
Select an option: 4

Solutions

5. Dice Rolling Simulator: Simulate the rolling of a dice and display the result.

Input values: None

Output value: Randomly generated dice roll results.

Example:

Input values:
None
Output value: The dice were rolled: 3

Solutions

6. Temperature converter: Create a program that converts temperatures between Fahrenheit and Celsius.

Input values:

User provides a temperature and selects the conversion type (Fahrenheit to Celsius or vice versa).

Output value: Converted the temperature.

Example:

Input values:
Enter temperature: 32
Select a conversion type (1 for Fahrenheit to Celsius, 2 for Celsius to Fahrenheit): 1
Output value: Converted temperature: 0.0oC

Solutions

7. Alarm Clock: Design a simple alarm clock application that allows users to set alarms.

Input values:

User sets an alarm time.

Output value:

Alarm notification when the set time is reached.

Example:

Input values:
Set alarm time: 07:30 AM
Output value: Alarm! It's 07:30 AM. Time to wake up!

Solutions

8. Random Password Generator: Generate a random password of a specified length.

Input values:

User specifies the desired password length.

Output value:

Randomly generated passwords of the specified length.

Example:

Input values:
Enter the desired password length: 12
Output value: Generated password: Xy#7pLm$9oR5

Solutions

9. Text-based Adventure Game:Develop a simple text-based adventure game with multiple choices for the player.

Input values:

Player makes choices by selecting options presented in the game.

Output value:

Story progression based on player choices, with different outcomes.

Example:

Input values:
1. Enter the dark cave.
2. Follow the path through the forest.
Output value: You chose to enter the dark cave. Inside, you find a treasure chest.
Input values: 1. Open the chest. 2. Leave the cave.
Output value: You chose to open the chest. Congratulations! You found a valuable gem.

Solutions

10. Rock, Paper, Scissors Game: Implement the classic game with a user interface.

From Wikipedia - Rock paper scissors (commonly scissors, paper, rock or stone in Australia and New Zealand) is an intransitive hand game, usually played between two people, in which each player simultaneously forms one of three shapes with an outstretched hand. These shapes are "rock" (a closed fist), "paper" (a flat hand), and "scissors" (a fist with the index finger and middle finger extended, forming a V). The earliest form of "rock paper scissors"-style game originated in China and was subsequently imported into Japan, where it reached its modern standardized form, before being spread throughout the world in the early 20th century.

Input values:

Player selects rock, paper, or scissors.

Output value:

Result of the game, indicating whether the player wins, loses, or it's a tie.

Example:

Input values:
Select your move (1 for Rock, 2 for Paper, 3 for Scissors): 2
Output value: Computer chose Rock. You win!
Input values: Select your move (1 for Rock, 2 for Paper, 3 for Scissors): 1
Output value: Computer chose Scissors. You lose!
Input values: Select your move (1 for Rock, 2 for Paper, 3 for Scissors): 3
Output value: Computer chose Paper. It's a tie!

Solutions

11. Currency Converter: Build a program that converts currency from one denomination to another.

Input values:

User provides an amount in one currency and selects the target currency for conversion.

Output value:

Converted the amount to the target currency.

Example:

Input values:
Enter the amount in USD: 50
Select target currency (1 for EUR, 2 for GBP, 3 for JPY): 2
Output value: Converted amount in GBP: £37.50

Solutions

12. Basic Web Scraper: Learn web scraping by extracting data from a website using libraries like BeautifulSoup.

Input values:

None (Automated process to extract data from a specified website).

Output value:

Data extracted from the website using libraries like BeautifulSoup.

Example:

Input values:
None
Output value: List all the h1 tags from https://en.wikipedia.org/wiki/Main_Page: <h1 class="firstHeading mw-first-heading" id="firstHeading" style="display: none"><span class="mw-page-title-main">Main Page</span></h1> <h1><span class="mw-headline" id="Welcome_to_Wikipedia">Welcome to <a href="/wiki/Wikipedia" title="Wikipedia">Wikipedia</a></span></h1>

Solutions

13. Basic Chatbot: Create a simple chatbot that responds to user input with predefined answers.

Input values:

Input or questions are provided by the user to the chatbot.

Output value:

Predefined responses generated by the chatbot.

Example:

Input values:
User: How are you?
Output value: Chatbot: I'm doing well, thank you!

Solutions

14. Hangman Game: Build a hangman game where players guess a word by suggesting letters. The game continues until the player correctly guesses the word or runs out of attempts.

Input values:

Player suggests a letter to guess the word.

Output value:

Feedback on whether the guessed letter is correct or incorrect. With revealed letters, display the current state of the word.

Example:

Input values:
Guess a letter: A
Output value: Incorrect! Current state: _
Input values: Guess a letter: E
Output value: Correct! Current state: E
Input values: Guess a letter: S
Output value: Incorrect! Current state: E
Input values: Guess a letter: R
Output value: Correct! Current state: E R _ ----------------------------------- -----------------------------------

Solutions

15. BMI Calculator: Develop a Body Mass Index calculator based on user input.

Input values:

User provides weight (in kilograms) and height (in meters).

Output value:

Calculated Body Mass Index (BMI) value and the corresponding BMI category.

Example:

Input values:
Enter weight (in kilograms): 70
Enter height (in meters): 1.75
Output value: BMI: 22.9 Category: Normal Weight

Solutions

16. File Organizer: Create a program that organizes files in a directory based on their types.

Input values:

User specifies the directory path to be organized.

Output value:

Files in the specified directory "temp" into subdirectories based on their types (e.g., images, pdfs, videos).

Example:

Input values:
Input directory path: /path/to/temp
Output value: Files in /path/to/temp organized: - images/ - image1.jpg - image2.png - documents/ - document1.pdf - videos/ - video1.mp4

Solutions

17. Simple Web Server: Build a basic web server using Flask or Django.

Input values:

None (Automated process to start the "web server").

Output value:

The output indicates the URL where the web server is accessible.

Example:

Input values:
None
Output value: Web server started at http://127.0.0.1:5000/

Solutions

18. Password Manager: Develop a password manager that stores and retrieves passwords securely.

Input values:

Add, edit, delete, or retrieve passwords stored in the password manager.

Output value:

Feedback based on user actions, such as success messages or retrieving passwords.

Example:

Input values:
1. Add Password
2. Retrieve Password
3. Edit Password
4. Delete Password
5. Exit
Select an option: 1 Input website/app name: example.com Input user ID: user_111 Input password: Oui*%#$ki
Output value: Password added successfully. Input values: 1. Add Password 2. Retrieve Password 3. Edit Password 4. Delete Password 5. Exit
Select an option: 2 Input website/app name: example.com Input user ID: user_111
Output value: Retrieved Password: Oui*%#$ki

Solutions

19. Tic-Tac-Toe Game: Implement a two-player tic-tac-toe game.

From Wikipedia - Tic-tac-toe (American English), noughts and crosses (Commonwealth English), or Xs and Os (Canadian or Irish English) is a paper-and-pencil game for two players who take turns marking the spaces in a three-by-three grid with X or O. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner. It is a solved game, with a forced draw assuming best play from both players.

Input values:

Players input their moves by specifying the row and column for placing their 'X' or 'O'.

Output value:

Current state of the tic-tac-toe board and feedback on the game state (e.g., win, draw).

Example:

Input values:
Player 1, enter your move (row and column): 1, 1
Output value: Current state:
| X | | | ------------- | | | | ------------- | | | |
Input values: Player 2, enter your move (row and column): 2, 2
Output value: Current state:
| X | | | ------------- | | 0 | | ------------- | | | |
Input values: Player 1, enter your move (row and column): 1, 2
Output value: Current state:
| X | X | | ------------- | | 0 | | ------------- | | | |
Input values: Player 2, enter your move (row and column): 2, 1
Output value: Current state:
X | X | | ------------- O | O | | ------------- | | | |
Input values: Player 1, enter your move (row and column): 1, 3
Output value: Current state:
| X | X | X | --------------- | 0 | 0 | | --------------- | | | |
Output value: Player 1 wins!

Solutions

20. Image Downloader: Build a program that downloads images from a given URL.

Input values:

User provides the URL of a website containing images to be downloaded.

Output value:

Images are downloaded from the specified URL and saved to a local directory.

Example:

Input values:
Enter the URL of the website with images: https://example.com/images
Output value: Images downloaded successfully and saved to the local directory.

Solutions

21. Basic Drawing App: Create a simple drawing application with basic shapes and colors.

Input values:

User interacts with the drawing application by selecting drawing tools (pencil, rectangle, etc.), shapes, colors, and making strokes on the canvas.

Output value:

Visual representation of the drawn elements on the canvas, including shapes and colors.

Example:

Input values:
1. Select Pencil tool
2. Select Red color
3. Draw a freehand stroke on the canvas
Output value: Canvas displays a Red freehand stroke.
Input values: 1. Select Rectangle tool 2. Select Blue color 3. Draw a rectangle on the canvas
Output value: Canvas displays a blue rectangle.
Input values: 1. Select Eraser tool 2. Erase part of the drawn elements
Output value: Canvas displays the erased portion.
Input values: 4. Save the drawing to a file
Output value: Drawing saved successfully to "my_drawing.png".

Solutions

22. URL Shortener:

Input values:

User provides a long URL to be shortened.

Output value:

Shortened URL generated and associated with the provided long URL.

Example:

Input values:
Input the long URL to be shortened: https://www.w3resource.com/python-exercises/python-conditional-statements-and-loop-exercises.php
Output value: Short URL: https://short.url/sw12r

Solutions

23. Basic Music Player: Build a simple music player that plays local audio files.

Input values:

User interacts with the music player by selecting audio files to play, controlling playback (play, pause, stop), and adjusting volume.

Output value:

Audio files are played with a visual representation of playback controls and volume adjustments.

Example:

Input values:
1. Select the audio file: "song1.mp3"
2. Click the play button
Output value: Music player displays playback controls and starts playing "song1.mp3". Input values: 3. Pause playback
Output value: Music player pauses playback at the current position.
Input values: 4. Select the audio file: "song2.mp3" 5. Click the play button
Output value: Music player displays playback controls and starts playing "song2.mp3".
Input values: 6. Stop playback
Output value: Music player stops playback, and the playback position resets.
Input values: 7. Adjust the volume to 75%
Output value: Music player adjusts the volume to 75%.

Solutions

24. Palindrome Checker: Create a program that checks if a given word or phrase is a palindrome.

Input values:

User provides a word or phrase to be checked for palindrome.

Output value:

Feedback indicates whether the provided word or phrase is a palindrome or not.

Example:

Input values:
Enter a word or phrase: radar
Output value: "radar" is a palindrome.
Input values: Enter a word or phrase: hello
Output value: "hello" is not a palindrome.
Input values: Enter a word or phrase: A man, a plan, a canal, Panama!
Output value: "A man, a plan, a canal, Panama!" is a palindrome.

Solutions

25. Basic Blog System: Build a minimalistic blog system with features like creating, editing, and deleting blog posts.

Input values:

User interacts with the blog system by creating, editing, and deleting blog posts.

Output value:

Visual representation of blog posts with feedback on user actions (create, edit, delete).

Example:

Input values:
1. Create a new blog post
- Input post title: "Python Projects"
- Input post content: "This is a beginner's guide to Python projects."
Output value: Blog system displays the new blog post: Title: Python Projects Content: This is a beginner's guide to Python projects.
Input values: 2. Edit an existing blog post - Input post title to edit: "Introduction to C Programming" - Input updated post content: "Learn the basics of coding and start your programming journey."
Output value: Blog system displays the updated blog post: Title: Introduction to C Programming Content: Learn the basics of coding and start your programming journey.
Input values: 3. Delete a blog post - Input post title to delete: "Python Projects"
Output value: Blog system removes deleted blog posts and displays the remaining posts.
Input values: 4. Exit the blog system
Output value: Blog system exits.

Solutions

26. Hangman Game with GUI: Enhance the Hangman game by adding a graphical user interface.

From Wikipedia - Hangman is a guessing game for two or more players. One player thinks of a word, phrase, or sentence and the other(s) try to guess it by suggesting letters or numbers within a certain number of guesses. Originally a paper-and-pencil game, now it's available in an electronic version.

The program updates the visual representation of the Hangman game based on the user's input. It provides feedback on the guess letters and game state.

Input values:

User interacts with the "graphical user interface" by clicking buttons to select letters for guessing.

Output value:

Visual representation of the Hangman game with feedback on guessed letters and game state.

Example:

Input values:
User clicks the button 'A' to guess the letter 'A'.
Output value: Visual representation updates to show the letter 'A' in the word if it exists, or displays the hangman figure if the letter is incorrect.
Input values: User clicks the button 'B' to guess the letter 'B'.
Output value: Visual representation updates to show the letter 'B' or displays the hangman figure if the letter is incorrect.
Input values: User clicks the button 'T' to guess the letter 'T'.
Output value: Visual representation updates to show the letter 'T' in the word if it exists, or displays the hangman figure if the letter is incorrect.
Input values: User clicks the button 'E' to guess the letter 'E'.
Output value: Visual representation updates to show the letter 'E' in the word if it exists, or displays the hangman figure if the letter is incorrect.
Input values: User clicks the button 'S' to guess the letter 'S'.
Output value: Visual representation updates to show the letter 'S' in the word if it exists, or displays the hangman figure if the letter is incorrect.
Input values: User clicks the button 'Y' to guess the letter 'Y'.
Output value: Visual representation updates to show the letter 'Y' in the word if it exists, or displays the hangman figure if the letter is incorrect.
Input values: User clicks the button 'N' to guess the letter 'N'.
Output value: Visual representation updates to show the letter 'N' in the word if it exists, or displays the hangman figure if the letter is incorrect.

Solutions

27. Calendar App: Create a basic calendar application that allows users to add events.

Input values:

User interacts with the calendar application by adding events, specifying event details such as date, time, and description.

Output value:

Visual representation of the calendar with added events and feedback on user actions (addition, deletion).

Example:

Input values:
1. Add an event
- Input event date: 2015-02-15
- Input event time: 10:00 AM
- Input event description: Meeting with the client.
Output value: Calendar app displays the event "Meeting with client" on February 15, 2015, at 10:00 AM.
Input values: 2. Add another event - Input event date: 2015-02-20 - Input event time: 2:30 PM - Input event description: Team brainstorming session
Output value: Calendar app displays the event "Team brainstorming session" on February 20, 2015, at 2:30 PM.
Input values: 3. Delete an event - Input event date to delete: 2015-02-15 - Input event time to delete: 10:00 AM
Output value: Calendar app removes "Meeting with client" from February 15, 2015.
Input values: 4. View the calendar
Output value: Calendar app displays all scheduled events for the month.

Solutions

28. Trivia Quiz Game: Develop a trivia quiz game with multiple-choice questions.

From Wikipedia - Trivia is information and data considered of little value. The word is derived from the Latin word triviae, meaning a place where a road splits into two (thus, creating a three-way intersection). It was introduced into English as the adjective trivial in the 15th and 16th centuries.

Modern usage of trivia dates back to the 1960s, when college students introduced question-and-answer contests to their universities. A board game, Trivial Pursuit, was released in 1982 in the same vein as these contests. Since its modern usage, trivia contests have been established at various academic levels as well as in casual venues such as bars and restaurants.

Input values:

User selects answers to multiple-choice questions presented by the trivia quiz game.

Output value:

Feedback on whether the selected answers are correct or incorrect, along with the final score at the end of the quiz.

Example:

Input values:
1. Select option (a, b, c, d) for Question 1: What is France's capital?
- User selects option: c) Paris
Output value: Feedback: Correct! Paris is France's capital.
Input values: 2. Select option (a, b, c, d) for Question 2: Who painted the Mona Lisa? - User selects option: b) Leonardo da Vinci
Output value: Feedback: Correct! Leonardo da Vinci painted the Mona Lisa.
Input values: 3. Select option (a, b, c, d) for Question 3: What is the tallest mountain in the world? - User selects option: d) Mount Everest
Output value: Feedback: Correct! Mount Everest is the tallest mountain in the world.
Input values: 4. Select option (a, b, c, d) for Question 4: Who wrote "Romeo and Juliet"? - User selects option: a) William Shakespeare
Output value: Feedback: Correct! William Shakespeare wrote "Romeo and Juliet."
Input values: 5. Select option (a, b, c, d) for Question 5: What is the chemical symbol for water? - User selects option: b) H2O
Output value: Feedback: Correct! H2O is the chemical symbol for water.
Final output value: Congratulations! You have completed the trivia quiz. Your score is 5 out of 5.

Solutions

29. Basic URL Crawler: Develop a program that crawls a website and extracts URLs.

Input values:

  • Starting URL: The URL from which the crawler will start.
  • Depth (optional): The number of levels the crawler will follow links from the starting URL.
  • Optional Parameters:
    • Domain restriction: Whether to restrict crawling to the same domain as the starting URL.
    • File types to include or exclude (e.g., only HTML pages).

Output value:

  • Extracted URLs: A list of URLs found during the crawling process.
  • Status Messages:
    • Progress updates.
    • Error messages if the crawling fails (e.g., invalid URL, network issues).

Example:

Example 1: Basic Crawling from a Starting URL

Input:

  • Starting URL: http://example.com

Output:

  • List of extracted URLs:
  • http://example.com/page1
    http://example.com/page2
    http://example.com/about
    http://example.com/contact
    

Example Console Output:

Starting URL: http://example.com
Crawling depth: 1
Crawling http://example.com...
Found URL: http://example.com/page1
Found URL: http://example.com/page2
Found URL: http://example.com/about
Found URL: http://example.com/contact
Crawling completed.

Example 2: Crawling with Depth Restriction

Input:

  • Starting URL: http://example.com
  • Depth: 2

Output:

  • List of extracted URLs:
  • http://example.com/page1
    http://example.com/page2
    http://example.com/about
    http://example.com/contact
    http://example.com/page1/subpage1
    http://example.com/page2/subpage2
    

Example Console Output

Starting URL: http://example.com
Crawling depth: 2
Crawling http://example.com...
Found URL: http://example.com/page1
Found URL: http://example.com/page2
Found URL: http://example.com/about
Found URL: http://example.com/contact
Crawling http://example.com/page1...
Found URL: http://example.com/page1/subpage1
Crawling http://example.com/page2...
Found URL: http://example.com/page2/subpage2
Crawling completed.

Example 3: Domain Restriction

Input:

  • Starting URL: http://example.com
  • Domain restriction: Yes

Output:

  • List of extracted URLs (only from the same domain):
  • http://example.com/page1
    http://example.com/page2
    http://example.com/about
    http://example.com/contact
    

Example Console Output:

Starting URL: http://example.com
Crawling depth: 1
Domain restriction: Yes
Crawling http://example.com...
Found URL: http://example.com/page1
Found URL: http://example.com/page2
Found URL: http://example.com/about
Found URL: http://example.com/contact
Crawling completed.

Solutions

30. Basic Drawing with Turtle Graphics: Explore Turtle graphics for simple drawing projects.

In this "Basic Drawing with Turtle Graphics" project, the user interacts with the Turtle graphics module by providing commands to draw shapes and patterns. The program outputs a visual representation of the drawing created using Turtle graphics based on the user's input.

Input values:

User interacts with the Turtle graphics module by providing commands to draw shapes and patterns.

Output value:

Visual representation of the drawing created using Turtle graphics.

Example:

Input values:
1. Move the turtle forward by 100 units
2. Turn the turtle left by 90 degrees
3. Move the turtle forward by 100 units
4. Turn the turtle left by 90 degrees
5. Move the turtle forward by 100 units
6. Turn the turtle left by 90 degrees
7. Move the turtle forward by 100 units
Output value: Visual representation displays a square drawn by the Turtle graphics module.
Input values: 1. Move the turtle forward by 100 units 2. Turn the turtle left by 120 degrees 3. Move the turtle forward by 100 units 4. Turn the turtle left by 120 degrees 5. Move the turtle forward by 100 units
Output value: Visual representation displays an equilateral triangle drawn by the Turtle graphics module.
Input values: 1. Move the turtle forward by 100 units 2. Turn the turtle left by 120 degrees 3. Repeat steps 1 and 2 five times Output value: Visual representation displays a regular pentagon drawn by the Turtle graphics module.

Solutions

31. Basic Text Editor: Create a text editor with features like opening, editing, and saving text files.

Input values:

User interacts with the text editor by opening, editing, and saving text files.

Output value:

Visual representation of the text editor with the contents of the text files, along with feedback on user actions (opening, editing, saving).

Example:

Input values:
1. Open an existing text file
- User selects the file: "test.txt"
Output value: Text editor displays the contents of the file "test.txt" for editing.
Input values: 2. Edit the text content - User modifies the text: "This is the edited content of the text file."
Output value: Text editor updates to display modified text content.
Input values: 3. Save the changes - User saves the changes made to the file.
Output value: Text editor saves the changes to the file "example.txt" and provides feedback on successful saving.
Input values: 4. Create a new text file - User selects to create a new file.
Output value: Text editor opens up a blank document for writing text.
Input values: 5. Enter text into the new document - User types: "This is a new document."
Output value: Text editor displays the entered text in the new document.
Input values: 6. Save the new document - User saves the new document as "new_test.txt".
Output value: Text editor saves the new document as "new_test.txt" and provides feedback on successful saving.

Solutions

32. URL Scraper: Build a program that extracts URLs from a given webpage.

Input values:

User provides the URL of a webpage from which URLs need to be extracted.

Output value:

List of URLs extracted from the given webpage.

Example:

Input values:
Enter the URL of the webpage: https://www.example.com
Output value: URLs extracted from the webpage: 1. https://www.example.com/page1 2. https://www.example.com/page2 3. https://www.example.com/page3 4. https://www.example.com/page4

Solutions

33. Contact Book: Build a program that manages contacts with features like adding, editing, and deleting contacts.

Input values:

User interacts with the contact book by adding, editing, and deleting contacts.

Output value:

Visual representation of the contact book with the list of contacts, along with feedback on user actions (addition, editing, deletion).

Example:

Input values:
1. Add a new contact
- User enters contact details: Name: Alinafe Lilith, Email: [email protected], Phone: 123-456-7890
Output value: Contact book updates to display the newly added contact "Alinafe Lilith" with the specified details.
Input values: 2. Edit an existing contact - User selects the contact "Alinafe Lilith" to edit and updates the email to "[email protected]"
Output value: The contact book is updated to display the edited contact "Alinafe Lilith" with the updated email.
Input values: 3. Delete a contact - User selects the contact "Alinafe Lilithe" to delete.
Output value: Contact book updates to remove "Alinafe Lilith" from the list.
Input values: 4. View the contact details - User selects a contact to view details.
Output value: Contact book displays the details of the selected contact, including name, email, and phone number.

Solutions

34. Basic Neural Network: Implement a simple neural network for a beginner's understanding of machine learning.

From AWS - A neural network is a method in artificial intelligence that teaches computers to process data in a way that is inspired by the human brain. It is a type of machine learning process, called deep learning, that uses interconnected nodes or neurons in a layered structure that resembles the human brain.

In this Basic Neural Network project, the user interacts with the neural network by supplying input data for training and testing. The program outputs predicted output values generated by the neural network based on the input data provided for testing. This project provides a beginner's understanding of machine learning and neural networks.

Input values:

User interacts with the neural network by providing input data (features) for training and testing.

Output value:

Predicted output values generated by the neural network based on the input data.

Example:

Input values (Training Data):
- Features: [0.1, 0.2, 0.3]
- Target output: 0
Output value (Training): Neural network trains on the provided input features and target output.
Input values (Testing Data): - Features: [0.4, 0.5, 0.6]
Output value (Testing): Neural network predicts the output based on the input features. Predicted output: 1

Solutions

35. File Encryption/Decryption: Create a program that encrypts and decrypts files.

Input values:

User interacts with the program by selecting files to encrypt or decrypt and providing encryption/decryption keys.

Output value:

Encrypted or decrypted versions of the selected files based on user input.

Example:

Input values:
1. Select a file to encrypt: "test.txt"
2. Enter the encryption key: "secretkey123"
Output value: The program encrypts the file "test.txt" using the provided encryption key "secretkey123" and saves the encrypted version as "test_encrypted.txt".
Input values: 3. Select a file to decrypt: "test_encrypted.txt" 4. Enter the decryption key: "secretkey123"
Output value: The program decrypts the file "test_encrypted.txt" using the provided decryption key "secretkey123" and saves the decrypted version as "document_decrypted.txt".

Solution

36. URL Analyzer: Build a program that analyzes and extracts information from a given URL.

Input values:

User provides a URL to be analyzed.

Output value:

Extract information and analysis results from the given URL.

Example:

Input values:
URL to analyze: https://www.example.com/about-us
Output value: Analysis results: - Domain: example.com - Protocol: HTTPS - Path: /about-us - Query parameters: None - HTTP status: 200 OK - Page title: About Us - Example - Meta description: Learn more about our company and our mission.
Input values: URL to analyze: https://www.example.com/products?category=electronics
Output value: Analysis results: - Domain: example.com - Protocol: HTTPS - Path: /products - Query parameters: category=electronics - HTTP status: 200 OK - Page title: Products - Example - Meta description: Browse our wide selection of electronics products.
Input values: URL to analyze: https://www.example.com/non-existent-page
Output value: Analysis results: - Domain: example.com - Protocol: HTTPS - Path: /non-existent-page - Query parameters: None - HTTP status: 404 Not Found - Error message: The requested page does not exist.

Solution

37. Currency Exchange Rate Checker: Develop a program that fetches and displays the latest currency exchange rates.

Input values:

User selects the currencies to compare or the base currency for which exchange rates are fetched.

Output value:

Latest currency exchange rates displayed for the selected currencies or against the base currency.

Example:

Input values:
1. Base currency: USD
- User selects USD as the base currency.
Output value: Latest exchange rates against USD: - EUR: 0.88 - GBP: 0.76 - JPY: 109.42 - AUD: 1.31 - CAD: 1.27
Input values: 2. Compare currencies: EUR, GBP - User selects EUR and GBP to compare exchange rates.
Output value: Latest exchange rates for EUR and GBP: - EUR to USD: 1.14 - GBP to USD: 1.31
Input values: 3. Compare currencies: EUR, JPY - User selects EUR and JPY to compare exchange rates.
Output value: Latest exchange rates for EUR and JPY: - EUR to USD: 1.14 - JPY to USD: 0.0091

Solution

38. Basic Paint App: Create a paint application with basic drawing tools and colors.

Input values:

User interacts with the paint application by selecting drawing tools, choosing colors, and drawing on the canvas.

Output value:

A visual representation of the canvas with the drawings created by the user using the tools and colors the user has chosen.

Example:

Input values:
1. Select a drawing tool: Pen
- User selects the pen tool for freehand drawing.
Output value: Paint application switches to pen tool mode for drawing.
Input values: 2. Choose a color: Red - User selects the color red for drawing.
Output value: Selected color changes to red for drawing.
Input values: 3. Draw on the canvas - User draws a freehand sketch on the canvas.
Output value: Visual representation updates to display the freehand sketch drawn by the user in red color.
Input values: 4. Select the drawing tool: Rectangle - User selects the rectangle tool for drawing shapes.
Output value: Paint application switches to rectangle tool mode for drawing.
Input values: 5. Choose a color: Blue - User selects blue for drawing rectangles.
Output value: Selected color changes to blue for rectangles.
Input values: 6. Draw a rectangle on the canvas - User draws a rectangle shape on the canvas.
Output value: Visual representation updates to display the rectangle shape drawn by the user in blue color.
Input values: 7. Erase the drawing. - User selects the eraser tool to erase part of the drawing.
Output value: Visual representation updates to erase part of the drawing using the eraser tool.

Solution

39. Word Cloud Generator: Build a program that generates a word cloud from a given text.

Input values:

User provides text or a document from which the word cloud will be generated.

Output value:

Visual representation of the word cloud generated from the provided text or document.

Example:

Input values:
Text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
Output value: Visual representation of the word cloud generated from the provided text, where frequently occurring words like "Lorem," "ipsum," "dolor," "sit," "amet," etc., are displayed in larger font sizes than less frequent words.
Input values: Text: "In hac habitasse platea dictumst. Vivamus suscipit tortor eget felis porttitor volutpat. Cras ultricies ligula sed magna dictum porta."
Output value: Visual representation of the word cloud generated from the provided text, where frequently occurring words like "habitas," "platea," "dictumst," "Vivamus," "suscipit," etc., are displayed in larger font sizes than less frequent words.

Solution

40. Weather Application: Create a program that fetches and displays weather information for a given location.

Input values:

User provides the location (e.g., city name, zip code) for which weather information is requested.

Output value:

Visual representation of the weather information fetched for the given location, including temperature, humidity, wind speed, etc.

Example:

Input values:
Location: New York City
Output value: Visual representation of New York City weather information: - Temperature: 55oF - Humidity: 70% - Wind speed: 10 mph - Weather Conditions: Cloudy
Input values: Location: London
Output value: Visual representation of weather information for London: - Temperature: 12oC - Humidity: 80% - Wind speed: 15 km/h - Weather Conditions: Rainy
Input values: Location: Tokyo
Output value: Visual representation of weather information for Tokyo: - Temperature: 20oC - Humidity: 60% - Wind speed: 8 km/h - Weather conditions: Sunny

Solution

41. Basic Alarm Clock with GUI: Build an alarm clock with a graphical user interface.

Input values:

1. User interacts with the graphical user interface (GUI) by setting the alarm time and activating/deactivating the alarm.

2. Users can also snooze or dismiss the alarm when it rings.

Output value:

Visual representation of the alarm clock interface displaying the current time, set alarm time, and feedback on alarm activation/deactivation.

Example:

Input values:
1. Set alarm time: 07:00 AM
- User sets the alarm time to 7:00 AM.
Output value: Visual representation of the alarm clock interface displays the set alarm time as 07:00 AM.
Input values: 2. Activate alarm - User activates the alarm.
Output value: Visual representation of the alarm clock interface displays the alarm activated and waits for the set alarm time.
Input values: 3. Alarm rings at 07:00 AM - The current time matches the set alarm time, and the alarm rings.
Output value: Visual representation of the alarm clock interface displays the alarm ringing with options to snooze or dismiss.
Input values: 4. Snooze alarm - User selects the Snooze option to delay the alarm for a specified duration.
Output value: Visual representation of the alarm clock interface displays the alarm snoozed for the specified duration.
Input values: 5. Dismiss alarm - User selects the dismiss option to stop the alarm ringing.
Output value: Visual representation of the alarm clock interface displays the alarm dismissed, and the interface returns to the regular state.

Solution

42. Number Guessing Game with GUI: Upgrade the number guessing game with a graphical user interface.

Input values:

1. User interacts with the graphical user interface (GUI) by entering a guessed number.

2. Users can also set the range of numbers for the game.

Output value:

Visual representation of the game interface displaying feedback on the guessed number, hints, and whether the guess is correct.

Example:

Input values:
1. Set the range of numbers: 1 to 100
- User sets the range of numbers for the game to be between 1 and 100.
Output value: Visual representation of the game interface displays the set range of numbers.
Input values: 2. Guess a number: 50 - User enters 50 as the guess number.
Output value: Visual representation of the game interface displays feedback that the guess number is too high or too low.
Input values: 3. Guess a number: 25 - User enters 25 as the guess number.
Output value: Visual representation of the game interface displays feedback that the guess number is too low.
Input values: 4. Guess a number: 37 - User enters 37 as the guess number.
Output value: Visual representation of the game interface displays feedback that the guess number is too high.
Input values: 5. Guess a number: 30 - User enters 30 as the guess number.
Output value: Visual representation of the game interface displays feedback that the guess number is correct.

Solution

43. Basic POS System: Develop a simple point-of-sale system for a small business.

From investopedia - A point of sale (POS) is a place where a customer executes the payment for goods or services and where sales taxes may become payable.

Input values:

1. User interacts with the POS system by entering product information (e.g., item name, quantity, price).

2. Users can also add items to the cart, remove items from the cart, and process payments.

Output value:

Visual representation of the POS interface displaying the current transaction details, including items in the cart, total price, and receipt.

Example:

Input values:
1. Add item to cart: 
- User scans or manually enters the item's barcode.
- User specifies the item quantity.
- User confirms the addition of the item to the cart.
Output value: Visual representation of the POS interface displays the added item with its name, quantity, price per unit, and total price. It also updates the total price of the transaction.
Input values: 2. Remove item from cart: - User selects an item from the cart to remove.
Output value: Visual representation of the POS interface removes the selected item from the cart and updates the total price of the transaction accordingly.
Input values: 3. Process payment: - User selects the payment method (e.g., cash, credit card). - User confirms the payment.
Output value: Visual representation of the POS interface displays a receipt with the list of items purchased, their quantities, prices, total price, and payment method. It also provides any change due if the payment method is cash.

Solution

44. Code Snippet Manager: Create a program to store and organize code snippets.

Input values:

1. User interacts with the program by adding, editing, or deleting code snippets.

2. User provides information such as snippet title, language, description, and code itself.

3. User can also search for specific snippets based on keywords or filters.

Output value:

Visual representation of the program interface displaying stored code snippets, search results, and feedback on user actions.

Example:

Input values:
1. Add a new code snippet:
- User enters the snippet title, language, description, and code.
- User saves the snippet.
Output value: Visual representation of the program interface displays the newly added code snippet in the list of snippets.
Input values: 2. Search for a snippet: - User enters keywords or filters to search for specific snippets.
Output value: Visual representation of the program interface displays search results matching the entered keywords or filters.
Input values: 3. Edit a code snippet: - User selects a code snippet to edit. - User modifies the snippet title, language, description, or code. - User saves the changes.
Output value: Visual representation of the program interface displays the edited code snippet with updated information.
Input values: 4. Delete a code snippet: - User selects a code snippet to delete. - User confirms deletion.
Output value: Visual representation of the program interface that removes the deleted code snippet from the list of snippets.
Input values: 5. View a code snippet: - User selects a code snippet to view its details and code.
Output value: Visual representation of the program interface displays the details and code of the selected snippet.
Input values: 6. Add tags to a code snippet: - User selects a code snippet to add tags. - User enters tags for the snippet. - User saves the tags.
Output value: Visual representation of the program interface displays the added tags for the code snippet.
Input values: 7. Filter snippets by tags: - User selects tags to filter snippets. - User applies the selected tags.
Output value: Visual representation of the program interface displays snippets filtered by selected tags.

Solution

45. Quiz Game with Timer: Develop a quiz game with a timer for each question.

Input values:

1. User interacts with the quiz game by selecting answers to quiz questions.

2. Users can also start the timer for each question and submit their answers within the time limit.

Output value:

Visual representation of the quiz game interface displaying quiz questions, answer options, a timer countdown for each question, and feedback on user responses.

Example:

Input values:
1. Start the quiz:
- User initiates the quiz game.
Output value: Visual representation of the quiz game interface displays the first quiz question, answer options, and starts the timer countdown.
Input values: 2. Select an answer: - User selects an answer option for the current quiz question. - User submits the answer before the timer runs out.
Output value: Visual representation of the quiz game interface displays feedback on the submitted answer and moves to the next quiz question if available.
Input values: 3. Timer runs out: - User fails to submit an answer before the timer runs out.
Output value: Visual representation of the quiz game interface displays feedback indicating that the time has expired for the current question. It moves to the next question if available.
Input values: 4. Complete the quiz: - User completes all quiz questions by selecting answer options and submitting answers.
Output value: Visual representation of the quiz game interface displays the final score, including the number of correct and incorrect answers. It also provides options to review quiz questions and answers.
Input values: 5. Review the quiz questions: - User chooses to review quiz questions and answers after completing the quiz.
Output value: Visual representation of the quiz game interface displays the quiz questions, selected answer options, correct answers, and user responses for review.

Solution

46. Stock Price Checker: Build a program that fetches and displays real-time stock prices.

Input values:
1. Ticker symbol of the stock (e.g., AAPL, GOOGL, MSFT).

Output value:

  1. Real-time stock price of the given ticker symbol.
  2. Additional information (optional):
    • Stock price change (amount and percentage) from the previous close.
    • Market capitalization.
    • Volume of shares traded.

Examples:

Example 1:

  • Input:
    • Ticker symbol: "AAPL"
  • Output:
    • Current price: $145.67
    • Price change: +$1.23 (+0.85%)
    • Market cap: $2.45T
    • Volume: 76.89M

Example 2:

  • Input:
    • Ticker symbol: "GOOGL"
  • Output:
    • Current price: $2734.56
    • Price change: -$15.78 (-0.57%)
    • Market cap: $1.82T
    • Volume: 1.23M

Solutions

47. Basic Movie Database: Create a simple movie database with features like adding, editing, and deleting movies.

Input values:
Add a Movie: Movie title
Director
Year of release
Genre.

Edit a Movie:
Movie ID or title (to identify the movie to be edited)
New title, director, year of release, and/or genre (fields to be updated)
Delete a Movie:
Movie ID or title (to identify the movie to be deleted)
View Movies:
Option to view all movies or search by title, director, year, or genre
Output Values: Confirmation message after adding, editing, or deleting a movie.
List of movies when viewing or searching.
Error messages if any operations fail (e.g., movie not found, invalid input).

Examples:

Example 1: Adding a Movie
Input:
Title: "Inception"
Director: "Christopher Nolan"
Year of Release: 2010
Genre: "Science Fiction"
Output:
"Movie 'Inception' added successfully."

Example 2: Editing a Movie
Input:
Movie ID: 1
New Title: "Inception: The Dream"
New Director: (leave blank to keep the same)
New Year of Release: (leave blank to keep the same)
New Genre: (leave blank to keep the same)
Output:
"Movie with ID 1 updated successfully."

Example 3: Deleting a Movie
Input:
Movie ID: 1
Output:
"Movie with ID 1 deleted successfully."

Example 4: Viewing Movies
Input:
Option: View all movies
Output:
List of all movies in the database:
1. Inception, directed by Christopher Nolan, released in 2010, Genre: Science Fiction
2. The Matrix, directed by Lana Wachowski and Lilly Wachowski, released in 1999, Genre: Science Fiction

Example 5: Searching for a Movie
Input:
Search by Title: "Inception"
Output:
List of movies matching the search:
1. Inception, directed by Christopher Nolan, released in 2010, Genre: Science Fiction

Solutions

More to Come !



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/projects/python/python_beginners_projects.php