Giter Club home page Giter Club logo

python-random-quote's Introduction

Simple Random Quote Generator

This is a simple Python project that generates random quotes from a text file. It can be a fun way to get inspirational or humorous quotes at random. This README will guide you through the setup and usage of the project.

Getting Started

Prerequisites

Make sure you have Python installed on your system. This project is compatible with both Python 2 and Python 3.

Installation

  1. Clone the project to your local machine:
git clone https://github.com/your-username/random-quote-generator.git
cd random-quote-generator
  1. Place your collection of quotes in a text file named quotes.txt. Each quote should be on a separate line.

Usage

Open a terminal and navigate to the project directory.

Run the script by executing the following command:

python get-quote.py

The script will read the quotes from the quotes.txt file and print a random quote to the console.

Example

Suppose your quotes.txt file contains the following quotes:

"The only way to do great work is to love what you do." - Steve Jobs
"Success is not final, failure is not fatal: It is the courage to continue that counts." - Winston Churchill
"Life is what happens when you're busy making other plans." - John Lennon

Running the script will display a random quote from the file:

"Success is not final, failure is not fatal: It is the courage to continue that counts." - Winston Churchill

Customization

You can modify the quotes.txt file to include your favorite quotes or add new quotes. Simply ensure that each quote is on a separate line within the file.

License

This project is licensed under the MIT License.

Acknowledgments

This project was created for educational and entertainment purposes. Feel free to customize and improve it as you like. Enjoy your random quotes!

python-random-quote's People

Contributors

adamd avatar eliza-wollinger avatar

Watchers

James Cloos avatar  avatar  avatar

python-random-quote's Issues

Prepare your environment

Before we can start writing Python, we need to make sure you have your environment set up. You just need a few things (some of which you might already have!)

  • Check that Python is installed
  • Check that Git is installed
  • Clone this repository on your local machine

Check that Python is installed

Your machine may already have Python, or you might need to install it. We also want to check that the right version of Python is present. To find out, go to your command line terminal and type: python -V

Make sure to use a capital -V or you'll get something very different. If you get an error or have a version less than 3, try this: python3 -V (again with the capital -V).

If you see your Python version displayed, you’re all set. Otherwise, you’ll need to download Python for your operating system. Make sure it's Python 3, as previous versions are deprecated.

Check that Git is installed

We’ll use a similar approach to find out if you already have git installed. From your comment line, type: git --version

If you see your Git version displayed, you’re good to go. Otherwise, you’ll need to download Git for your operating system.

Clone this repository on your local machine

Now we’re getting to the fun stuff. Let’s clone this repository to your local machine so that we can make some edits:
git clone https://github.com/wollieliza/python-random-quote.git

You can also download or clone the repo via SSH from the main repo page.

Close this issue to continue

With your environment ready, let’s get started.

Close this issue and I’ll comment with your next steps!

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.