Download presentation
Presentation is loading. Please wait.
Published bySage Shield Modified over 10 years ago
1
CompSci 101 Introduction to Computer Science January 22, 2015 Prof. Rodger compsci101 spring151
2
Announcements Reading, RQ 05 for next time Assignment 2 due Tues APT 1 is due today, APT 2 out compsci101 spring152
3
REMINDER DO NOT SIT IN THE LAST TWO ROWS! Come forward and sit beside someone you haven’t met compsci101 spring153
4
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 compsci101 spring154
5
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 compsci101 spring155
6
Submitting an APT or Assignment Use Ambient – submit –Submit History – files submitted should be listed! –Alternative – use web submit –Tuesday midnight means Tuesday 11:59pm + 1 minute –If you can’t submit on your computer, copy your file to another computer (Link?) and submit with websubmit on that computer compsci101 spring156
7
Why is this person so important to this course? Have you donated yet? compsci101 spring157
8
Top 10 list for surving in CompSci 101 10. Ask questions 9. Eat lots of pizza 8. Learn how to spell Rodger 7. Read the book 6. Do the reading quizzes compsci101 spring158
9
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 compsci101 spring159
10
Algorithm Describe in words how to solve a problem Like a recipe, must be detailed and precice compsci101 spring1510
11
Whole Genome Shotgun with words bit.ly/101S15-0122-01 Creation algorithm –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? olve problems. ratively, create, compsci101 we get t 01 we get to work colla vely, create, and s. In compsci1 y, create, and s e get to work collabo … compsci101 spring1511
12
Review Functions www.bit.ly/101S15-0122-02 compsci101 spring1512
13
Use Python Tutor Debug/trace your code Doesn’t work with input files compsci101 spring1513
14
Assignment 2 How to start? Where does import go? Student work? compsci101 spring1514
15
Solve an APT - Pancakes bit.ly/101S15-0122-03 compsci101 spring1515
16
Computer Science Alum Biology and CS Undergraduate Research - JFLAP Epic Now in Med School at Vanderbilt compsci101 spring1516
17
More Computer Science Duke Alums compsci101 spring1517
18
More on Strings Strings are indexed starting at 0 Example: ‘word’ 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. w or d 0 1 2 3 compsci101 spring1518
19
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 compsci101 spring1519
20
Loop over all characters in a String compsci101 spring1520
21
Loop over string Online form: www.bit.ly/101S15-0122-04 compsci101 spring1521
22
Loop over all words in a list compsci101 spring1522
23
Loop over words Online form: www.bit.ly/101S15-0122-05 compsci101 spring1523
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.