LING 408/508: Programming for Linguists Lecture 19 November 4 th.

Slides:



Advertisements
Similar presentations
LING/C SC/PSYC 438/538 Computational Linguistics Sandiway Fong Lecture 13: 10/9.
Advertisements

Test Driven Development George Mason University. Today’s topics Review of Chapter 1: Testing Go over examples and questions testing in Java with Junit.
LING/C SC/PSYC 438/538 Lecture 4 9/1 Sandiway Fong.
Monday, 9/23/02, Slide #1 CS 106 Intro to CS 1 Monday, 9/23/02  QUESTIONS??  Today:  Discuss Lab 3  Do Exercises  Introduction to functions  Reading:
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.
MA 102 Statistical Controversies Monday, February 18, 2002 Today: Discuss Chapter 9 concepts and exercises Review Part 1 of the text Test 1 question types.
Lecture 7. Review Homework 1 (sample solution) Project 1 will be assigned next week –Draw a picture (whatever you want) in the world by using turtles.
Chapter 3 Computing with Numbers
Recitation 1 Programming for Engineers in Python.
Python Programming, 2/e1 Python Programming: An Introduction to Computer Science Chapter 3 Computing with Numbers.
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.
Chapter 7 – Solving Systems of Linear Equations
Vahé Karamian Python Programming CS-110 CHAPTER 3 Computing with Numbers.
Computing with Numbers CSC 161: The Art of Programming Prof. Henry Kautz 9/14/2009.
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.
Introduction to Computer Science A Professor Uday Reddy
1 CSC 221: Introduction to Programming Fall 2012 Functions & Modules  standard modules: math, random  Python documentation, help  user-defined functions,
Test Driven Development George Mason University. Today’s topics Review of Chapter 1: Testing Go over examples and questions testing in Python.
Computer Science 101 Introduction to Programming.
PYTHON PROGRAMING Week 15 – Tuesday.
BIT 115: Introduction To Programming Instructor: Jon Peck
8/29/2014BCHB Edwards Introduction to Python BCHB Lecture 2.
Mixing integer and floating point numbers in an arithmetic operation.
Chapter 8 – Exponents and Exponential Functions 8.1/8.3 – Multiplication and Division Properties of Exponents.
Lecture 6 Complex Sorting 1. Announcements Homework 3 due Monday No participation this week Test is on Thursday Part of Wednesday will be review I will.
LING 408/508: Programming for Linguists Lecture 18 November 2 nd.
Python Functions : chapter 3
Data Types and Conversions, Input from the Keyboard CS303E: Elements of Computers and Programming.
LING 408/508: Programming for Linguists Lecture 20 November 16 th.
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/C SC/PSYC 438/538 Lecture 6 Sandiway Fong. Homework 4 Submit one PDF file Your submission should include code and sample runs Due date Monday 21.
LING 408/508: Programming for Linguists Lecture 19 November 9 th.
LING 408/508: Programming for Linguists Online Lecture 7 September 16 th.
CS1010: Programming Methodology
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.
PYTHON PROGRAMMING Week 5 - Wednesday. THE FRIENDSHIP ALGORITHM Note the infinite loop!
November 7, 2011 Objective: Students will understand how to read a credit report and begin to understand how to analyze a credit report to make a credit.
Chapter INTRODUCTION Data Types and Arithmetic Calculations.
Chapter 5: Preparing C Programs
Introduction to Python
Introduction to Python
Python Programming: An Introduction to Computer Science
CMSC201 Computer Science I for Majors Lecture 22 – Binary (and More)
ECE Application Programming
CS 100: Roadmap to Computing
Introduction to Python
LING 388: Computers and Language
LING 388: Computers and Language
LING 388: Computers and Language
Arithmetic operations, decisions and looping
LING/C SC/PSYC 438/538 Lecture 3 Sandiway Fong.
LING 388: Computers and Language
LING 388: Computers and Language
LING 408/508: Computational Techniques for Linguists
Plan Attendance Files Posted on Campus Cruiser Homework Reminder
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.
Introduction to Python
Introduction to Python
LING 388: Computers and Language
Lecture 37 – Practice Exercises 9
LING 388: Computers and Language
Lecture 37 – Practice Exercises 9
LING/C SC/PSYC 438/538 Lecture 3 Sandiway Fong.
Presentation transcript:

LING 408/508: Programming for Linguists Lecture 19 November 4 th

Administrivia Homework 5 – Does your BMI webserver program work? Homework 6 out today

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

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

Homework 6 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 next Monday by midnight