Giter Site home page Giter Site logo

python-beginners-projects's Introduction

Python-Beginners-Projects

Source

Completed Projects

1: Odd or even?

Let’s start with a super easy project you can build right away. Write a small Python program that asks the user for a number and tells them if it is odd or even.

01-even_odd.py

2: Guessing the number

Making a user guess a number is another easy Python program you can write in just a few lines of code. It should generate a random number between, let’s say, 0 and 100. The player then needs to guess what that number is. Should the user guess wrong, the program should respond by telling them their guess is either too low or too high. When the user guesses right, your program should ask them if they want to play again. For a little added challenge, you can limit the number of guesses to 5, for example.

02-number-guess.py

3: Horoscope

Create a simple horoscope program that asks the user for their star sign and outputs a fun horoscope for them. Bear in mind that your program should display an error message if the user types in their sign wrong.

Note, the way I implemented this I ask for the users birthday, and output their star sign.

03-horoscope.py

4: Rock Paper Scissors

Rock Paper Scissors (or RPS) is one of my favorite Python projects for beginners. It’s simple enough but still challenging since you need to think about how to turn the game rules into logic for the program.

The rules are simple:

Paper wins over rock Rock wins over scissors Scissors win over paper Have your program generate a random answer for the computer – but don’t display it. Then, ask the player for their answer.

04-rock_paper_scissors.py

5: Hangman

Hangman is one of the best Python projects for beginners who want a bit of a challenge. The game is about guessing a random word with a limited number of guesses.

Although Hangman may sound rather simple, you need to consider a few key points, such as:

You need to set a maximum limit for guesses. The player needs to be notified about the remaining number of guesses. Your player needs to be able to input their guesses. To get started, you need a way to generate random words to be guessed. The best way is to simply create a separate text file where you store the words or short phrases.

This Python project will probably take you a bit longer, but it’s great practice. You will have to think about random choice, variables, boolean values, inputs and outputs, strings, length, and much more.

05-hangman.py

6: Acronym

An acronym Python program will take a given phrase or text and convert it into its acronym. That is, a word that consists of the first letters of each word in the text.

To make your acronym easier to read, go ahead and turn the letters into uppercase with Python. Also, think about how the program will take text as input from the user while separating that user input from the logic itself.

06-acronym.py

7: Password Generator

Create a Python program that generates a random password for the user. Make sure your program takes a few inputs from the user:

How long should the password be? How many characters should there be? Should it have both uppercase and lowercase letters? Should it include numbers and special symbols, too? The best part about this small Python project is that you can actually use it for generating strong passwords for your own user accounts across the Web!

07-passwordgenerator.py

7: Word Count

Write a Python program that takes a text file as an input and outputs how many times each word occurs in the text.

You can start small by counting the number of words in a list, for example. Use the Counter collection for this.

Once you understand how the collection works, move on to more advanced inputs, such as longer text files. You can access complete book scripts for free at Project Gutenberg for this.

08-word_counter.py i_have_a_dream.txt

Projects Not Started

8: Pong Game

Creating a simple Pong game is one of the easiest projects to learn how to use Python for simple video games. You can use the Pygame library to speed up your workflow for designing and writing your game.

Using Python to build simple but fun games is definitely one of the most enjoyable ways to learn the language. Moreover, you will get more ideas for developing your game further and adding new features while you’re playing.

9: Tic Tac Toe

Tic Tac Toe is a fun Python project to build in a single day. It’s the game where two players take turns marking the 3×3 grid with cross and circle symbols.

The player who gets three marks in a horizontal, vertical, or diagonal row is the winner.

This little Python project is fun to build but it requires you to think about the logic of the game in your code.

The players need to take turns and the game needs to keep going until (1) someone wins or (2) the grid is full, for example.

Hence, before you start writing actual Python code, map out the different features of the game.

First, write down all the steps your program needs to go through. Only then start writing out those steps using Python.

10: Data analysis with Python

Conducting data analysis with Python is a great idea for an intermediate Python project.

Python supports a number of powerful libraries you can use for analyzing, visualizing, and mining data.

Small data analysis projects will familiarize you with a few popular Python libraries, such as Matplotlib, NumPy, and Pandas, for instance.

python-beginners-projects's People

Contributors

summerzahara avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.