1 / 9

Chapter 1: Python Basics

Chapter 1: Python Basics. CSCI-UA 0002 – Introduction to Computer Programming Mr. Joel Kemp. Agenda. What is Python? How do we get it? How do we execute our programs?. This material can be found in Chapter 3 of the Visual Quickstart Guide. What is Python?.

brit
Télécharger la présentation

Chapter 1: Python Basics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 1: Python Basics CSCI-UA 0002 – Introduction to Computer Programming Mr. Joel Kemp

  2. Agenda • What is Python? • How do we get it? • How do we execute our programs? This material can be found in Chapter 3 of the Visual Quickstart Guide

  3. What is Python? • A programming language that emphasizes readable code! • Combines power with clear syntax. • Interpreted not compiled! • Why are we using it? • Very beginner friendly! • Beginners shouldn’t be burdened with syntax. • Semicolons, braces, pointers, datatype declarations. • Increases programmer productivity.

  4. From Design to Interpretation

  5. Installing Python • Visit python.org/download • For Windows Users: Python 3.2 Windows x86 MSI installer • For Mac Users: Python 3.2 64-bit/32-bit Installer • Run the downloaded installer and complete the installation process.

  6. Before We Start • Python code is placed in a regular text file that must end with the .py extension. • Can be written in any plain text editor : • Notepad, Notepad++ (Windows) • TextEdit, TextWrangler (Mac OSX) • Avoid using Wordpad and Microsoft Word! • Integrated Development Environment (IDE) • Definition: a large computer program that provides tools for increasing productivity in software development. • Tools: • Intellisense/Auto-Completion • Real-time error-checking • Debugging • Compiler and/or Interpreter • We’ll be using the IDLE IDE!

  7. IDLE IDE • Included with the Python Installation! • Written in Python! • Allows us to bypass running python files from the command line!

  8. Running a Python File (Command Line) • Open the command prompt or terminal. • Navigate to the location of the python file: • Use the cd command to access folders. • Use the cd command with two periods (cd ..) to move backward in the filesystem. • To run/interpret the python file: • Type python filename.py(where filename is the file you’re trying to run)

  9. Running a Python File (IDLE) • Create a new file or open an existing python file. • Click on the Run Module button in the Run menu!

More Related