Introduction to Python: Slides Referenced in Homework 0 CSE-391: Artificial Intelligence University of Pennsylvania Matt Huenerfauth January 2005.

Slides:



Advertisements
Similar presentations
COMPUTER PROGRAMMING Task 1 LEVEL 6 PROGRAMMING: Be able to use a text based language like Python and JavaScript & correctly use procedures and functions.
Advertisements

Introduction to Python
Programming The Development Environment and Your First C Program.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Russell Taylor Lecturer in Computing & Business Studies.
Copyright © 2014 Dr. James D. Palmer; This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
CSC 9010: Natural Language Processing
PYTHON: LESSON 1 Catherine and Annie. WHAT IS PYTHON ANYWAY?  Python is a programming language.  But what’s a programming language?  It’s a language.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
Chapter 1: Python Basics CSCI-UA 0002 – Introduction to Computer Programming Mr. Joel Kemp.
Programming 101 with Python: an open-source, cross-platform, and fun language By J. Burton Browning, Ed.D. Copyright © J. Burton Browning All rights reserved.
CS110/CS119 Introduction to Computing (Java)
The NetBeans IDE CSIS 3701: Advanced Object Oriented Programming.
Introduction to Python Basics of the Language. Install Python Find the most recent distribution for your computer at:
Introduction to Programming Workshop 1 PHYS1101 Discovery Skills in Physics Dr. Nigel Dipper Room 125d
Python 0 Some material adapted from Upenn cmpe391 slides and other sources.
PYTHON. Python is a high-level, interpreted, interactive and object- oriented scripting language. Python was designed to be highly readable which uses.
Lesson 6. GCSE Computing – programming languages Candidates should be able to:  describe common tools and facilities available in an integrated development.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Programs, programs, everywhere! This is a starter activity and should take 5 minutes 1.Open up a text editor such as Notepad. 2.Write a list of all the.
 We are going to learn about programming in general…How to think logically and problem solve. The programming language we will use is Python. This is.
August 29, 2005ICP: Chapter 1: Introduction to Python Programming 1 Introduction to Computer Programming Chapter 1: Introduction to Python Programming.
Introduction to Python I CSE-391: Artificial Intelligence University of Pennsylvania Matt Huenerfauth January 2005.
CSE 373, S. Tanimoto Introduction - 1 Data Structures and Algorithms Computational Structures and Methods in a 21st Century Context Computer Science and.
Computer Science 101 Introduction to Programming.
Lecture 21 CS110 Lecture 2 January 29, 2004 Announcements –hw1 part 1 – due right now –hw1 part 2 – due Tuesday night Questions Agenda –turnin –Object.
Artificial Intelligence Programming in Prolog Lecture 1: An Introduction 23/09/04.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Introduction to Unix – CS 21 Lecture 8. Lecture Overview More detail on emacs and vi Regular expression matching in emacs and vi.
Python – May 11 Briefing Course overview Introduction to the language Lab.
Chapter Three The UNIX Editors.
Programming for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
IDLE An IDE for Python bundled with the program release Click on IDLE (Python GUI) in the Start menu under the Python program group  Get the IDLE Python.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 4: Writing programs.
Installing and Developing Programs in Python. Installing Python is pre-installed on most Unix systems, including Linux and MAC OS X The pre-installed.
Trinity College Dublin, The University of Dublin GE3M25: Computer Programming for Biologists Python Karsten Hokamp, PhD Genetics TCD, 03/11/2015.
CSC 1010 Programming for All Lecture 2 Introduction to Python Some material based on material from Marty Stepp, Instructor, University of Washington.
©2012 Paula Matuszek CSC 9010: Text Mining Applications Lab 2 Dr. Paula Matuszek (610)
PROGRAMMING IN R Introduction to R. In this session I will: Introduce you to the R program and windows Show how to install R Write basic programs in R.
Python Lesson 1 1. Starter Create the following Excel spreadsheet and complete the calculations using formulae: 2 Add A1 and B1 A2 minus B2 A3 times B3.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
Programming C++ in Linux by various IDEs and editors by: Danial Khashabi Master: Dr.B.Taheri November 2008.
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
Chapter 3: Mastering Editors Chapter 3 Mastering Editors (Emacs)
CSE 374 Programming Concepts & Tools
Development Environment
CST 1101 Problem Solving Using Computers
CSCI 203: Introduction to Computer Science I
Lab Introduction Installing Python
Introduction Python is an interpreted, object-oriented and high-level programming language, which is different from a compiled one like C/C++/Java. Its.
Guide To UNIX Using Linux Third Edition
Week 1 Gates Introduction to Information Technology cosc 010 Week 1 Gates
Data Analysis using Python-I
Do you know this browser?...
Understanding Assignment
CS190/295 Programming in Python for Life Sciences: Lecture 1
Fill the screen challenge!
Today’s lesson – Python next steps
First Python Program Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An.
Web Programming: Course Overview
Class Projects and Environment
Introduction In today’s lesson we will look at: why Python?
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
12th Computer Science – Unit 5
Chapter 1: Programming Basics, Python History and Program Components
Input and Output Python3 Beginner #3.
Python 12 Mr. Husch.
The Python interpreter
CSCI 203: Introduction to Computer Science I
Presentation transcript:

Introduction to Python: Slides Referenced in Homework 0 CSE-391: Artificial Intelligence University of Pennsylvania Matt Huenerfauth January 2005

What is Python? A programming language with strong similarities to PERL, but with powerful typing and object oriented features. –Commonly used for producing HTML content on websites. Great for text files. –Useful built-in types (lists, dictionaries). –Clean syntax, powerful extensions.

Why Python for CSE-391? Textbook Code: Very Object Oriented –Python much less verbose than Java AI Processing: Symbolic –Python’s built-in datatypes for strings, lists, and more. –Java or C++ require the use of special classes for this. AI Processing: Statistical –Python has strong numeric processing capabilities: matrix operations, etc. –Suitable for probability and machine learning code.

Before we get started…

Homework 0: Learning Python Unfortunately, we won’t have time to cover all of Python in class; so, we’re just going to go over the highlights. –You’ll need to learn more on your own. –Homework 0 asks you to install Python or get comfortable using it on Eniac. It also asks you to read some online Python tutorials. –Later homeworks will include Python programming exercises to help you practice.

Homework 0: Python Tutorials You should definitely read these… “Dive into Python” (Chapters 2 to 4) Python 101 – Beginning Python You should browse these and refer to them… The Official Python Tutorial The Python Quick Reference

Homework 0: Official Handout There’s an official handout for Homework 0 (available on the class website) that describes the assignment in more detail. –There is some Python code to submit. –There are some questions to answer about the readings.

Technical Issues

Installing Python Python is on eniac: /pkg/bin/python Python for Win/Mac from GUI development environment: IDLE. Credits:

IDLE Development Environment Shell for interactive evaluation. Text editor with color-coding and smart indenting for creating python files. Menu commands for changing system settings and running files. You’ll see me using IDLE in class.

Running Interactively on UNIX On Unix… % python >>> The ‘>>>’ is the Python prompt. In Unix, when finished, you can use CONTROL+D.

Running Programs on UNIX % python filename.py You can create python files using emacs. (There’s a special Python editing mode.) You could even make the *.py file executable and add the following text to top of the file to make it runable: #!/pkg/bin/python