CompSci 101 Introduction to Computer Science January 13, 2015 Prof. Rodger compsci 101 spring 20151.
-
Upload
willa-norton -
Category
Documents
-
view
226 -
download
0
Transcript of CompSci 101 Introduction to Computer Science January 13, 2015 Prof. Rodger compsci 101 spring 20151.
CompSci 101Introduction to Computer Science
January 13, 2015
Prof. Rodger
compsci 101 spring 2015 1
Announcements• Reading for next time on calendar page
– RQ 2 due Thursday 10am
• Assignment 1 is out today, due in 1 week• Labs
– Try to install everything before going to lab– Practice downloading and running program– Programming in Scratch
• Today: Problem solving, Scratch, Python
compsci 101 spring 2015 2
Visitor today
Prof. Ron Parr
Chair, Computer Science Department
compsci 101 spring 2015 3
How does one get help?• Consulting hours
– Sunday-Thursday 7-11pm– (see Help tab)
• Office hours (prof, TAs)• Piazza
– Ask questions– Do not post your code and ask what is wrong!– Post error message and line of code for error
message– If added class late, may need to add yourself
4
Your work in the class
• Lectures/Labs – work in groups• Assignments/APTs – individual work
– Get help from Prof., TAs, UTAs– Discuss with others in class the general idea,
but you must write your own code– Acknowledge anyone you got help from or
consulted with – put in README file
• DO NOT search for answers on the web or post your code on the web 5
Our Programming Environment• Install 5 items
• Why Java? – not using• Eclipse – platform for
development• Python – programming language• Pydev – Python IDE for Eclipse• Ambient – turnin/snarf files
to/from Dukecompsci 101 spring 2015 6
Last Time - Python codehello.py
compsci 101 spring 2015 7
Last time - Python codeCount 4-letter words in a file.
8
Questions?
Design a data file for testing bit.ly/101S15-0113-01
9
How many words?Which words?
Should you understand all that code?
• Not yet, this is a beginner class. • You will be writing code that is much
simpler to start.• Should understand it by the first exam
compsci 101 spring 2015 10
Melinda French Gates• Duke Alum, CS/Econ major• Duke Commencement 2013
11
Word Clouds
• Number of occurrences/emphasis indicated by size of word
• Site to make a word cloud: – wordle.net
• U.S. Presidential Speeches: – http://chir.ag/projects/preztags/
compsci 101 spring 2015 12
Classwork: Word Cloudhttp://bit.ly/101S15-0113-02
• Given a file of words• Discuss how to make a word cloud
– How do you organize the words?– What information do you need to calculate?– What do you need to calculate to display words?
compsci 101 spring 2015 13
Computer Science and Medicine
Prof. Bruce Donald Grad Student: Pablo Gainzcompsci 101 spring 2015 14
Concepts you'll learn in Compsci 101
• Programming– Practice, skill, art, science, engineering, creativity
• Problem-solving– How to solve problems using programming and a
computer• Impact of computer science
– Scale and automation: powerful forces• Foundation for future work
– In many areas, not limited to compsci@duke
compsci 101 spring 2015 15
Programming Examples
• Scratch example in class (also in lab)
• Hour of code: http://code.org – Designed for kids, useful to millions
• Assignment 1 - Light-bot
• Python!compsci 101 spring 2015 16
Scratchscratch.mit.edu
• Demo – build Scratch program
compsci 101 spring 2015 17