CompSci 101 Introduction to Computer Science

Slides:



Advertisements
Similar presentations
CompSci 101 Introduction to Computer Science January 22, 2015 Prof. Rodger compsci101 spring151.
Advertisements

CompSci 101 Introduction to Computer Science January 13, 2015 Prof. Rodger compsci 101 spring
How to Learn in This Course CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.1 © Mitchell Wand, This work is licensed under a Creative Commons.
CSCI 51 Introduction to Computer Science Dr. Joshua Stough January 20, 2009.
Compsci 101.2, Fall PFThursday l Review Organization and Problem-Solving  Defining functions, calling functions  Return types, print, None l.
BIT 115: Introduction To Programming Instructor: Mike Panitz
How to Learn in This Course CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.1 © Mitchell Wand, This work is licensed under a Creative Commons.
CompSci 101 Introduction to Computer Science Sept. 9, 2014 Prof. Rodger President Brodhead speech graduation 2010 CompSci 101 Fall
Compsci 101.2, Fall PFTWeek l Introduce new Python concepts  Control: if, elif, else, for  Data: Strings, Lists Operators on data: slicing,
CompSci 101 Introduction to Computer Science January 28, 2016 Prof. Rodger compsci101 spring161.
Compsci 06/101, Spring Compsci 6: PFTW l Problem solving and (Python) programming  What are the steps in solving an APT?  How do you get better.
CompSci 101 Introduction to Computer Science February 4, 2016 Prof. Rodger compsci101 spring161.
CompSci 6 Introduction to Computer Science Sept. 20, 2011 Prof. Rodger CompSci 6 Fall
CompSci 101 Introduction to Computer Science January 26, 2016 Prof. Rodger compsci 101, spring
CompSci 101 Introduction to Computer Science November 11, 2014 Prof. Rodger CompSci 101 Fall Review for exam.
CompSci 101 Introduction to Computer Science February 25, 2016 Prof. Rodger compsci101 spring20161.
CompSci 6 Introduction to Computer Science September 27, 2011 Prof. Rodger CompSci 6 Fall
CompSci 101 Introduction to Computer Science February 5, 2015 Prof. Rodger Lecture given by Elizabeth Dowd compsci101 spring151.
All materials copyright UMBC unless otherwise noted CMSC201 Computer Science I for Majors Lecture 02 – Algorithmic Thinking.
CMSC201 Computer Science I for Majors Lecture 25 – Final Exam Review Prof. Katherine Gibson Prof. Jeremy Dixon.
CompSci 101 Introduction to Computer Science Sept 13, 2016 Prof. Rodger compsci101 fall161.
CompSci 4 Java 1 Apr 2, 2009 Prof. Susan Rodger. Announcements Assignment 7 questions? –Beware having two events that kick in at the same time! –Beware.
Introduction to CSCI 1311 Dr. Mark C. Lewis
Last Class We Covered Decision structures One-way (using if)
How to Learn in This Course
CSc 120 Introduction to Computer Programing II
CITS1001 Object Oriented Programming and Software Engineering
Elementary Programming Concepts Hannah Westra
Course Overview - Database Systems
CMSC201 Computer Science I for Majors Lecture 02 – Algorithmic Thinking Prof. Katherine Gibson Based on slides by Shawn Lupoli and Max Morawski at UMBC.
Course Information and Introductions
CompSci 101 Introduction to Computer Science
INTERMEDIATE PROGRAMMING WITH JAVA
Astronomy 20 – The Solar System
Course Information and Introductions
Introduction to Eclipse
1 MATH 112 (Thursday) Fall 2014 Instructor:.
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CMSC201 Computer Science I for Majors Lecture 13 – Midterm Review
CompSci 101 Introduction to Computer Science
CompSci 6 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CMSC201 Computer Science I for Majors Lecture 13 – Midterm Review
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
Using MyMathLab Features
CMSC201 Computer Science I for Majors Lecture 27 – Final Exam Review
We’ll be spending minutes talking about Quiz 1 that you’ll be taking at the next class session before you take the Gateway Quiz today.
Course Overview - Database Systems
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
Introduction to Computer Science
CompSci 101 Introduction to Computer Science
Introduction to Computers Spring 2018
Using MyMathLab Features
Introduction to Computers SPRING 2019
CMSC201 Computer Science I for Majors Lecture 25 – Final Exam Review
Programming.
CS 1111 Introduction to Programming Fall 2018
Algorithm and Ambiguity
Compsci 6/101: PFTW Review how APTs and Python work, run
Using CourseCompass Features
CMSC201 Computer Science I for Majors Final Exam Information
CMSC201 Computer Science I for Majors Lecture 12 – Midterm Review
CompSci 101 Introduction to Computer Science
Presentation transcript:

CompSci 101 Introduction to Computer Science Jan. 26, 2017 Prof. Rodger Blueberry pancakes, yum! Bring Blank paper for this lecture! compsci101 spring17

Announcements Reading and RQ5 due next time Assignment 2 due Tuesday APT 1 is due today, APT 2 out today Catch up Schedule on main web page Today – Solving problems – 7 Step process Decisions - if, Boolean Last Thursday in January compsci101 spring17

Assignment 2 Questions? Show Student Solution compsci101 spring17

Submitting Assignment 2 Use Ambient/eclipse Check if submitted with Submit History – files submitted should be listed! Alternative submit – use websubmit – on assign tab What time is it due? Tuesday 11:59pm If you can’t submit on your computer, copy your file to another computer (Link?) and submit with websubmit on that computer compsci101 spring17

Why is this person so important to this course? Brad Miller took Python book from Elkner, Downey and Meyer and created the software for an online textbook that allows you to experiment with the python right in the book Without him, no free book! compsci101 spring17

Why is this person so important to this course? Have you donated yet? Brad Miller took Python book from Elkner, Downey and Meyer and created the software to allow you to experiment with the python right in the book Without him, no free book! compsci101 spring17

Top 10 list for surviving in CompSci 101 10. Read the book and Ask questions 9. Eat lots of pizza 8. Learn how to spell Rodger 7. Understand what you turn in 6. Follow the 7 step process Learn seven step process today compsci101 spring17

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 Seek help (consulting hours, piazza, office hours) Start early compsci101 spring17

Names, Types and Values bit.ly/101s17-0126-1 compsci 101, spring 2017

Review Functions www.bit.ly/101s17-0126-2 compsci101 spring17 Show this in Python Tutor! compsci101 spring17

How many ways can I run Python in this course? Eclipse Complete program Interactive Console APT Online textbook We are using Python 2.7 ‘/’ (2.7) vs ‘//’ (3) Python Tutor What is an APT, testing one method and it comes with free tests. YOU WILL KNOW when an APT is correct! You may not know for an assignment. Have not seen python tutor yet, will see today compsci101 spring17

Use Python Tutor Debug/trace your code Doesn’t work with input files Trace through previous example with Python Tutor compsci101 spring17

Grace Murray Hopper (1906-1992) “third programmer on world's first large-scale digital computer” US Navy: Admiral “It's better to show that something can be done and apologize for not asking permission, than to try to persuade the powers that be at the beginning” https://www.youtube.com/watch?v=1-vcErOPofQ ACM Hopper award given for contributions before 35 2010: Craig Gentry: http://www.youtube.com/watch?v=qe-zmHoPW30 2011: Luis von Ahn 2013: Pedro Felzenszwab 2014: Sylvia Ratnasamy 2015: Brent Waters Play between start to 1:15, then nanosecond 4 to 5:30 Craig Gentry is Duke class of 1995, then Duke Law School, then Stanford PhD in computer science, Second link is video about Craig’s work in cryptography. Luis von Ahn is Duke class of 2000, then CMU PD. See ACM website for details on others who are more recent winners

APT Pancake: http://bit.ly/pancakes101 How do you solve this problem? First steps: are there simple cases that can be solved immediately? What are these for the pancake problem? Sometimes it helps to know if you are on track, should you use Python to check your paper and pencil work? Get specific, solve for 5, not N Fix one parameter, vary the other Identify the cases and continue compsci101 spring17

Solve an APT - Pancakes bit.ly/101s17-0126-3 compsci101 spring17

Problem Solving to Code 7 Step Process Work small examples by hand Write down what you did in words (algorithm) Find Patterns (generalize algorithm) Work another example by hand (does your algorithm work? If not, go back to 2) Translate to code Test several cases Debug failed test cases Now you have several APTs to solve. It is a huge step to go from problem statement to code! Use the seven step process Which step is writing code? It is not step one!!!!!!

Pancake Problem Work through the 7 step process…. compsci101 spring17 This takes awhile to solve Work the example by hand with pansize 4 pancakes – draw a picture. How do you calculate the answer. Try the example pansize 2, 3 pancakes. (see notes from last semester Jan 28 code – actually me working problem, then I did the code) Write down algorithm compsci101 spring17

Three pancakes in a two-cake pan… Number of cakes in the system First 5 minutes Number of cakes in the system Second 5 minutes compsci101 spring17

Three pancakes in a two-cake pan… Number of cakes in the system Third 5 minutes How many minutes to cook all three pancakes? compsci101 spring17

How to solve problems with different cases? Keep score in a video game? Different points for different tasks? Translate a book from English to Spanish? Different words, different rules Identify proteins in strands of DNA? Start codon: atg Stop Codon: tag Different cases with Pancake APT? In Python use: if, else ,elif compsci101 spring17

How to teach pancake Flipping http://www.youtube.com/watch?v=W_gxLKSsSIE Is this computer science? http://bit.ly/zykOrh For longer, more complex robotic tasks http://www.youtube.com/watch?v=4usoE981e7I compsci101 spring17