Welcome to CSCA20 An Introduction to Computer Programming Anna Bretscher Why Study Computer Science? • Computers provide tools to simplify processes • Computers allow for analysis that is otherwise impossible • Computer science can be applied to many problems in the sciences, business, arts, humanities… • Computers don’t always do what we think they are doing, better to understand when this happens! Course Goals • To learn most Python instructions. • To be able to write programs that solve scientific (or other) problems. • To understand what computer scientists do. • To acquire an appreciation of how computer science applies to other areas of research. CSCA20 - Content • Intended for students with no programming experience. • Introduction to • algorithms • programming using Python • Data analysis and plotting • Database design CSCA20 - Course Work Textbook – ebook or hardcopy “Practical Programming 2nd Edition” by Campbell, Gries, Lockwood, Montojo and Wilson http://pragprog.com/book/gwpy2/practical-programming Labs (10%) 2 hour labs every week, starting in week 2. Assignments (40%) 4 assignments - 10% each CSCA20 - Tests Quizzes (15%) Quizzes in weeks 4, 7 and 11 during lab time. Think of quizzes as practice for the final. Final (35%) You need to score at least 40% to pass the Course. Labs • 2 hour labs every week starting in week 2. • You earn 1% per lab attended up to 10%. • This means you may miss one lab. • These are the “tutorials” on ROSI • Labs are your new best friend. This is where you will learn the most! Assignments • Posted on the website. • Submitted electronically. • First assignment very short and easy – an easy way to earn 10%. • 2nd, 3rd and 4th assignments progressively more challenging. Where do I get HELP!! Labs Ask your TA questions. Your labs are also like office hours!! Office Hours M 11:00 - 11:45, W 11:30 – 1:00, F 12:10 - 1:00 Come visit me, I want to get to know you. Online Tutorial http://interactivepython.org/courselib/static/thinkcspy/index.html Email Me •bretscher@utsc.utoronto.ca •Include a relevant subject (e.g., CSCA20 - A1 question 2). •Sign your name. Week 1 - To Do List Read the course information sheet and check out the website. Order/download the text and read chapters 1 and 2 Install Python and Wing 101 (if working at home) See the “Resource” page on the website Computer Science Is about problem solving and writing algorithms. ALGORITHM (WEBSTER’S). A step-by-step procedure for solving a problem or accomplishing some end especially by a computer Lets Practice Algorithms Give the smiley face instructions to get to the star. Use Forward, Right, Left. F x 2, R F x 2, L F x 7, R F x 2, R F, L F, R F, L F x 2, R F x 3, R F Let Practice Algorithms – Take 2 F x 9, R F x 9, R F x 9, R F x 7, R F x 7, R F x 5, R F x 5, R F x 3, R F x 3, R F Let Practice Algorithms – Take 2 F x 9, R F x 9, R F x 9, R F x 7, R F x 7, R F x 5, R F x 5, R F x 3, R F x 3, R F F x 9, R steps 9 (F x steps, R) x 2 steps 7 (F x steps, R) x 2 steps 5 (F x steps, R) x 2 steps 3 (F x steps, R) x 2 F Algorithms – Take 2 F x 9, R steps 9 F x 9, R steps 9 (F x steps, R) x 2 steps steps 7 -2 (F x steps, R) x 2 steps steps 5 -2 (F x steps, R) x 2 steps steps 3 -2 (F x steps, R) x 2 while steps > 2 repeat: (F x steps, R) x 2 steps steps - 2 F F Python • Python is the language we will use to write our algorithms. • We use Wing 101: a free environment and editor for coding in Python. Editor Shell