LING 408/508: Programming for Linguists Lecture 20 November 16 th.

Slides:



Advertisements
Similar presentations
CSCI 3 CH 1.6. REMINDER Remember to put your Student ID # on your homework Remember to put your Student ID # on your homework If you are not going to.
Advertisements

Chapter 3 Computing with Numbers
Recitation 1 Programming for Engineers in Python.
LING 408/508: Programming for Linguists Lecture 19 November 4 th.
Python Programming, 2/e1 Python Programming: An Introduction to Computer Science Chapter 3 Computing with Numbers.
Python Programming: An Introduction to Computer Science
Python Programming: An Introduction to Computer Science Chapter 3 Computing with Numbers Python Programming, 2/e1.
LING 408/508: Programming for Linguists Lecture 2 August 28 th.
Fundamentals of Python: First Programs Chapter 4: Number Systems.
Vahé Karamian Python Programming CS-110 CHAPTER 3 Computing with Numbers.
CS 100: Roadmap to Computing Fall 2014 Lecture 01.
Computing with Numbers CSC 161: The Art of Programming Prof. Henry Kautz 9/14/2009.
Chapter 2.2 Scientific Notation. Expresses numbers in two parts: A number between 1 and 10 Ten raised to a power Examples: 2.32 x x
PYTHON PROGRAMMING Week 14 – Tuesday. STARTER You need to find out the average of a set of exam marks for a class. You don’t know how many marks there.
Munster Programming Training
1 CSC 221: Introduction to Programming Fall 2012 Functions & Modules  standard modules: math, random  Python documentation, help  user-defined functions,
CS190/295 Programming in Python for Life Sciences: Lecture 3 Instructor: Xiaohui Xie University of California, Irvine.
Test Driven Development George Mason University. Today’s topics Review of Chapter 1: Testing Go over examples and questions testing in Python.
Type accurately challenge! This is a starter activity and should take 2 minutes [ slide 1 ] 1.Can you type out the code in Code Box 2.1 with no errors.
BIT 115: Introduction To Programming Instructor: Jon Peck
8/29/2014BCHB Edwards Introduction to Python BCHB Lecture 2.
Variables When programming it is often necessary to store a value for use later on in the program. A variable is a label given to a location in memory.
Mixing integer and floating point numbers in an arithmetic operation.
MLG 205 September 5. Check Homework Major Due Dates in your planner 3-ring binder, paper, and folders.
Python Functions : chapter 3
Computer Science I CSCI Summer 2009 David E. Goldschmidt, Ph.D.
Data Types and Conversions, Input from the Keyboard CS303E: Elements of Computers and Programming.
Basic Types CGS 3460, Lecture 19 Feb 22, 2006 Hen-I Yang.
Negative binary numbers 1 Computer Architectures M.
LING 408/508: Programming for Linguists Online Lecture 6 September 14 th.
Data Types and Conversions, Input from the Keyboard If you can't write it down in English, you can't code it. -- Peter Halpern If you lie to the computer,
LING 408/508: Programming for Linguists Lecture 19 November 9 th.
LING 408/508: Programming for Linguists Online Lecture 7 September 16 th.
Section 5 Digital Electronic Circuits. Chapter 32 Binary Number System.
1 EGR 277 – Digital Logic Syllabus Office Hours No food or drinks in the classrooms Web page (demonstration) Lecture #1 EGR 277 – Digital Logic Reading.
Chapter INTRODUCTION Data Types and Arithmetic Calculations.
Introduction to Python
Python Programming: An Introduction to Computer Science
CMSC201 Computer Science I for Majors Lecture 22 – Binary (and More)
Data Types and Conversions, Input from the Keyboard
ECE Application Programming
Exploring Computer Science Lesson 5-2
CS 100: Roadmap to Computing
Think What will be the output?
LING 388: Computers and Language
LING 388: Computers and Language
Arithmetic operations, decisions and looping
BCD = Binary Coded Decimal
LING/C SC/PSYC 438/538 Lecture 3 Sandiway Fong.
LING 388: Computers and Language
LING 388: Computers and Language
Data Representation – Chapter 3
Quick Graphs Using Slope-Intercept Form
Introduction to Programming
LING 408/508: Computational Techniques for Linguists
Plan Attendance Files Posted on Campus Cruiser Homework Reminder
How Computers Store Data
LING 408/508: Computational Techniques for Linguists
LING 388: Computers and Language
LING 408/508: Computational Techniques for Linguists
LING 388: Computers and Language
Chapter 14 Partial Derivatives. Chapter 14 Partial Derivatives.
LING 388: Computers and Language
月夜憶舍弟 戍鼓斷人行,邊秋一雁聲。 露從今夜白,月是故鄉明。 有弟皆分散,無家問死生。 寄書長不達,況乃未休兵。 杜甫
Lecture 37 – Practice Exercises 9
Final Exam - NEXT WEEK! The final exam is worth 400 points, twice as much as each of the semester exams. The remaining homework assignments count toward.
LING 388: Computers and Language
Lecture 37 – Practice Exercises 9
Exam #2 covering Sections 11 to 15 - NEXT CLASS!
LING/C SC/PSYC 438/538 Lecture 3 Sandiway Fong.
Presentation transcript:

LING 408/508: Programming for Linguists Lecture 20 November 16 th

Administrivia Quickie Homework 10 – Python Term Programming Project – Did you me about your proposed project yet?

Online documentation

Python Chapter 3: Computing with Numbers Last time: – Number data types: int, float – Matters for things like division: / 9/5 produces different result from 9/5.0 Basic: Library: module

Python math.sqrt() complex numbers: import cmath

Python range() : produces a list (sequence) –range(n) [0,1,..,n-1] –range(start,n) [start,start+1,..,n-1] –range(start,n,step) [start,start+step,…,last] – last=start+k*step < n –range(n,stop,-step) counts down (page 40)

Python How about to 2 decimal places?

Python page 60: see factorial.py – Python automatically converts to type long int from int (32 bit 2's complement), (page 64–65, section 3.5) – explicit type coercion: 1.float() 2.int() 3.long() 4.complex(r,i) 5.complex(string)

Homework 10 Pick any three of the programming exercises from page – Program them up in python – Submit your code and sample runs all in one pdf file – Due this Saturday by midnight