Giter Club home page Giter Club logo

python's Introduction

python

1 What is python?

Python is a programming language. You write code files, and then you can run the code files, and they'll do what you told them to do. This tutorial will teach you how to use python in a variety of situations. If this is your first programming language, hopefully this is a gateway to a new way of understanding the world!

Two ways to play

There are two ways to approach this tutorial set. If you have time, we recommend installing python on your own computer:

  1. Go to the python website: https://www.python.org/downloads/
  2. Follow the python install instructions. If you are asked whether to "Add Python to PATH", press Yes or check the checkbox.
  3. Copy this set of code files, by pressing the green button on the upper right ("CODE") and download this code as a zip file. (Or, if you know how to use git, you can use that too.)
  4. Download an editing tool e.g. visual studio code (https://code.visualstudio.com/). This will highlight the code and make it so much easier to read.
  5. Open each file with your editing tool (use right click->open with or otherwise).
  6. Read each file and the included comments. When you're ready to run your program:
    1. [WINDOWS] Open a console window by pressing shift+right click in the file explorer where the code file is located.
    2. Press Open Powershell Window Here
    3. In the blue window that pops up, type in python the_code_file.py, then press enter.

Alternatively, if you don't have much room on your computer, you can use an online python environment. We recommend https://repl.it/languages/python3. Then, instead of downloading the files here, you can copy the entire contents of the file into the window on the left, and press the run button when you're ready.

Alright, time to get started! The files in this repository include:

  1. 1_helloworld.py
  2. 2_variables.py
  3. 3_types.py
  4. 4_input.py
  5. 5_control.py
  6. 6_lists.py
  7. 7_dictionaries.py
  8. 8_functions.py
  9. 9_classes.py
  10. 10_libraries.py

If you have any edits to suggest, please email [email protected] :)

Challenges

Once you're done looking over all the files, try some of these challenges!

  • A program that outputs triangular numbers
  • A program that outputs prime numbers
  • A program that simulates a projectile's motion
  • A program that tells you the current system time

Happy coding!

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.