Download Python Basics

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Falcon (programming language) wikipedia , lookup

Go (programming language) wikipedia , lookup

Java (programming language) wikipedia , lookup

C Sharp (programming language) wikipedia , lookup

Java ConcurrentMap wikipedia , lookup

Java performance wikipedia , lookup

Python syntax and semantics wikipedia , lookup

Python (programming language) wikipedia , lookup

Transcript
PYTHON BASICS
FredxCoders June 2014
What is Python?
Python
• Python is an interpreted language
• You don’t have to compile it like Java
• Supports 2 different versions
• Version 2.7.x
• Version 3.x
• The two versions are very similar, but have a few
distinct changes
• We’ll use version 3 today
Python
• Is platform independent
• This means you can take it anywhere like Scratch
and Java
• You don’t need to recompile it
IDLE
• IDLE is an integrated development environment
(IDE) specifically for Python
• This is similar to eclipse for Java or the Scratch tool.
• Lets you write, save, edit, and run your programs
• Has 2 modes
• Interactive
• script
IDLE interactive mode
• Provides a Python shell (terminal)
• Accepts and executes python statements
• Gives immediate feedback
• Great tool for trial/error and experimentation
IDLE Script Mode
• Loads and executes programs (scripts)
• The code that makes up your program is written
and saved in a source file (.py)
• Python is directed to interpret and run the saved
program
Types of Programs
• Console Applications
• Program executes in a terminal (or the Python shell)
• Can display only text
• Graphical User Interfaces
• Programs are interacted through a window
• Can display data and provide a
Very Important
• There is one very important difference between Python
and Java!
• Java uses { }
• Python uses whitespace (spaces and tabs)
• Be very careful how many spaces and/or tabs you use!
Python Help
• PyDocs
• Documentation on Python and built in modules
• StackOverflow
• Q&A programming site