Comp Sci 101 Introduction to Computer Science January
- Slides: 23
Comp. Sci 101 Introduction to Computer Science January 22, 2015 Prof. Rodger compsci 101 spring 15 1
Announcements • Reading, RQ 05 for next time • Assignment 2 due Tues • APT 1 is due today, APT 2 out compsci 101 spring 15 2
REMINDER DO NOT SIT IN THE LAST TWO ROWS! Come forward and sit beside someone you haven’t met compsci 101 spring 15 3
How many ways can I run Python in this course? • Eclipse – Complete program – Console – APT • Online textbook – Beware Python 3 (‘/’ (2. 7) vs ‘//’ (3) ) • Python Tutor compsci 101 spring 15 4
How to get Help in this class • • Piazza Consulting hours (Sunday-Thursday nights) Office hours (Prof, Tas) What happens if my laptop breaks and I can’t use my eclipse? Do I stop programming? – Clusters, Python Tutor, websubmit, borrow • What happens if you send Prof. Rodger an email? • 35 support people vs. 1 person, may take awhile to answer compsci 101 spring 15 5
Submitting an APT or Assignment • Use Ambient – submit – Submit History – files submitted should be listed! – Alternative – use web submit – Tuesday midnight means Tuesday 11: 59 pm + 1 minute – If you can’t submit on your computer, copy your file to another computer (Link? ) and submit with websubmit on that computer compsci 101 spring 15 6
Why is this person so important to this course? • Have you donated yet? compsci 101 spring 15 7
Top 10 list for surving in Comp. Sci 101 10. Ask questions 9. Eat lots of pizza 8. Learn how to spell Rodger 7. Read the book 6. Do the reading quizzes compsci 101 spring 15 8
Top 10 list (cont) 5. Check Piazza every day 4. Visit your prof in her office 3. Learn how to debug your programs 2. Seek help (one hour rule!) 1. Start programming assignments early compsci 101 spring 15 9
Algorithm • Describe in words how to solve a problem • Like a recipe, must be detailed and precice compsci 101 spring 15 10
Whole Genome Shotgun with words bit. ly/101 S 15 -0122 -01 • Creation algorithm olve problems. ratively, create, compsci 101 we get to work colla vely, create, and s. In compsci 1 y, create, and s e get to work collabo … – Take a phrase – Replicate it four times – Chop into "chunks" • 15 -22 characters • Figure out the original phrase • Describe the algorithm to recreate original phrase? compsci 101 spring 15 11
Review Functions www. bit. ly/101 S 15 -0122 -02 compsci 101 spring 15 12
Use Python Tutor • Debug/trace your code • Doesn’t work with input files compsci 101 spring 15 13
Assignment 2 • How to start? • Where does import go? • Student work? compsci 101 spring 15 14
Solve an APT - Pancakes bit. ly/101 S 15 -0122 -03 compsci 101 spring 15 15
Computer Science Alum • • Biology and CS Undergraduate Research - JFLAP Epic Now in Med School at Vanderbilt compsci 101 spring 15 16
More Computer Science Duke Alums compsci 101 spring 15 17
More on Strings • Strings are indexed starting at 0 • Example: ‘word’ w o r d 0 1 2 3 • Use [num] – to refer to a particular character in word • Use [x: y] to refer to a slice of the string starting at position x and up to but not including position y. Can leave out x or y. compsci 101 spring 15 18
Examples phrase = "Duke Blue Devils" print phrase[0] print phrase[-3] print phrase[1: 3] print phrase[5: 10] + phrase[: 4] print (phrase[phrase. find('ev'): ]). upper() String fun Crazy import compsci 101 spring 15 19
Loop over all characters in a String compsci 101 spring 15 20
Loop over string • Online form: www. bit. ly/101 S 15 -0122 -04 compsci 101 spring 15 21
Loop over all words in a list compsci 101 spring 15 22
Loop over words • Online form: www. bit. ly/101 S 15 -0122 -05 compsci 101 spring 15 23
- Ap csa recursion practice
- Eecs 110
- Comp sci 1102
- Comp sci 1027
- Comp sci 301 uw madison
- Comp 101 unc
- What is your favorite subject
- Science fusion digital lessons
- Introduction to computer science midterm exam
- Introduction to computer science midterm exam test
- C++ code
- Python programming an introduction to computer science
- Intel pentium
- Computer hardware 101
- Computer networking 101
- 101 computer
- C++ 101
- Umass poli sci
- Sci technology work from home
- Sci auditoria
- Spi vs sci
- Scigateway
- Sci-borg
- Math sci