Download presentation
Presentation is loading. Please wait.
Published byDiana Hoover Modified over 9 years ago
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) 1.Open the command prompt or terminal. 2.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. 3.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) 1.Create a new file or open an existing python file. 2.Click on the Run Module button in the Run menu!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.