GithubHelp home page GithubHelp logo

raspberrypilearning / python-intro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bennuttall/python-intro

32.0 9.0 9.0 646 KB

A set of Python exercises led by hints in comments - suitable for beginner / intermediate level

Home Page: http://www.raspberrypi.org/learning/python-intro/

License: Other

Python 100.00%

python-intro's Introduction

This is an archived resource. The repo will remain available but the resource will no longer be maintained or updated. Some or all parts of the resource may no longer work. To see our latest resources, please visit raspberrypi.org.

Python Intro

A Python learning tool with beginner exercises in using variables, data structures and basic control flow. Instructions and guidance are given in comments in the file.

Python

Compatible with both Python 3 and Python 2.

Also designed to be PEP-8 compliant to encourage good coding style.

Contents

  • Printing
  • Variables
  • Basic maths operators (add, subtract, multiply)
  • Basic variable types (strings, integers)
  • Concatenating strings
  • Casting an integer to a string
  • Booleans (True / False)
  • Inequalities (Greater Than / Less Than)
  • If/Else statements
  • Lists
  • List methods (append, extend)
  • Adding lists together with +
  • Sets
  • For Loops
  • Indexing strings
  • Splitting strings
  • Tuples
  • Dictionaries

How to use

Run the command wget http://goo.gl/0ZDOdX -O intro.py --no-check-certificate and open with idle3 intro.py &.

Run the file with F5 to see the output then go back to the code and read the instructions, edit away, save and run again.

Python 2 or Python 3?

The code works in both versions of Python, but Python 3 is recommended. Read about this in our documentation.

Licence

Unless otherwise specified, everything in this repository is covered by the following licence:

Creative Commons Attribution 4.0 International Licence

Python Intro by Ben Nuttall is licensed under a Creative Commons Attribution 4.0 International Licence.

Based on a work at https://github.com/bennuttall/python-intro

python-intro's People

Contributors

bennuttall avatar clivebeale avatar jcla1 avatar lauraclay avatar marcscott avatar qmacro avatar recantha avatar stevieflow avatar toastwaffle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-intro's Issues

Update to new format

  • cover.png
  • LICENCE.md
  • CONTRIBUTING.md
  • meta.yml
  • hardware.yml
  • software.yml
  • extras.yml
  • overview.md
  • learn.md

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.