Python Projects for Beginners

Python Projects for Beginners

If you have started with Python, then the following projects will help you start with some of the Python project ideas.

Project#1 – Calculator

This is pretty basic project, where you deal with the basics of Python.

Type of Project – Command Line Project

Topics that you should know

  • Datatypes, especially numeric datatypes in Python.
  • Standard Console Input-Output statements like input() and print().
  • Arithmetic Operators, Assignment Operator, etc.
  • Decision making statements like If, If-Elif, etc., statements.
  • Looping statements like while loop.

Pseudo Algorithm

  1. Present user with the operations in calculator, like 1. Addition 2. Subtraction 3. Multiplication 4. STOP.
  2. Read the user’s choice of operation.
  3. Based on the choice, read arguments required for the operation.
  4. Perform the operation, and print out the result.
  5. Go to step 1.

Project# – Web Crawler

Given a website URL, get all the unique URLs present in that page, and repeat the process for all the newly found URLs, until you do not find any more new unique URLs.

Type of Project – Command Line Project

Topics that you should know

  • Get web page content given a URL.
  • Parse a web page and get all the URLs present in the page.
  • String Processing.
  • Python Lists to store the URLs.
  • Looping statements like while loop or for loop, to process all URLs.
  • Recursion maybe.
  • Decision making statements like If, If-Elif, etc., statements.
  • Standard Console Input-Output statements like input() to read URL for user.

Pseudo Algorithm

  1. Read URL from user.
  2. Download the page using URL and store in a string.
  3. Parse this string (web page) using xml or html parsers.
  4. Get all the anchor href attribute values. These are the new URLs.
  5. For each URL, if you have not crawled already, go to step 2.
  6. If there is no URL that you have not crawled already, stop.
Code copied to clipboard successfully 👍