Giter Club home page Giter Club logo

python-random-quote's People

Contributors

adamd avatar

python-random-quote's Issues

Run your first Python program

Now you're ready to start coding. Let's get familiar with the files in our repo:

  • README.md: a markdown introduction to this project
  • get-quote.py: the file where we'll write our Python code
  • quotes.txt: a text file with a list of quotes

Open up get-quote.py and comment out line 2 by removing the # from the beginning of the line. It will look like this:

  print("Keep it logically awesome.")

The two spaces (or one tab) in front of the line is important. Python uses whitespace to organize code. This print line is part of the main() function. But more on that in the next step. First, let's try running that Python script.

Use the Python 3 command to run the script. From the command line, type one of the following:

  • python get-quote.py
  • python3 get-quote.py

You should see our first quote, the one hard-coded into line 2, printed out in your terminal:
Keep it logically awesome.

Push your changes

You've edited your local code, so you have a more recent version than is stored in this repository. You can check that any time by running: git status

It should show one file modified. Every time we want to send our local changes to GitHub, we need to perform three steps:

  1. Add the file(s) with changes: git add get-quote.py
  2. Commit the changes: git commit -m "Hello World"
  3. Push the changes: git push

Once you've completed these steps, we'll write some more Python.

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.