cps6-110906

cps6-110906 - CompSci 6 Introduction to Computer Science...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CompSci 6 Introduction to Computer Science September 6, 2011 Prof. Rodger compsci 6 fall 2011 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Announcements • Read for next time Chap 3 • Reading Quiz (RQ 2) on Blackboard – Due before class next time • Lab 2 starts Thursday compsci 6 fall 2011 2
Background image of page 2
Python – Programming Concepts • Names vs abstractions – What is http://152.3.140.1 – What is http://www.amazon.com • Types are important – What is foo.pdf, foo.mp4, foo.jpg, foo.wav – Do the file extensions guarantee file type? • Python first = "Susan" x = 6 y = 3.4 compsci 6 fall 2011 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Review(modified) – Names/Types def countWords(filename): fff = open(filename) sss = fff.read() words = sss.split() unique = set(words) print "filename: ", filename print "total # words = ",len(words) print "unique # words = ",len(unique) countWords(‘romeo.txt') What are names and their types? Questions? compsci 6 fall 2011 4
Background image of page 4
• def functionName(parameters): block • def sum(a, b): return a+b • Call function
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 12

cps6-110906 - CompSci 6 Introduction to Computer Science...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online