GithubHelp home page GithubHelp logo

python-quotes's Introduction

Guess The Quote

Challenge

Taken from Colt Steele's The Modern Python 3 Bootcamp, my challenge was to build a quotes guessing game, run on the command line, using Python3 and BeautifulSoup.

The game scrapes Quotes to Scrape for a collection of quotes, selects one at random and displays it to the player. The player is then given four chances to guess the name of the person who said the quote. If the player is wrong, they are given a clue about the person's identity.

Approach

The suggested approach in building this application was to do so using only a few, long methods. However, given my experience in OOP, I instead decided upon extracting the functionality of the application into three separate classes:

  • a Scraper class to make the http request to the site, to extract the data and to format it into a list;

  • a Game class to control the logistics of the game itself i.e. starting the game and considering guesses; and

  • a Printer class to display messages to the player via the command line.

Technology Used

In building this application I made use of the following technologies and modules:

Installation

Prerequisites

The application uses Python 3. If you have not previously installed Python 3 onto your machine, follow the instructions here to do so.

Playing the Game

Download the repository by navigating to an appropriate location on the command line and running:

git clone https://github.com/bwk103/Python-Quotes.git

Install the required modules by running the following command on the command line:

python3 -m pip install requests bs4 pyfiglet termcolor

Run the application by running the following command:

python3 Game.py

Credits

  • Colt Steele for the project idea.

  • Quotes to Scrape for the many inspiring quotes.

python-quotes's People

Contributors

bwk103 avatar

Watchers

James Cloos avatar  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.