Programming with Multimedia Objects CS 177. B ASICS Course Mechanics Expectations. Lukasz (Luke) Ziarek. Curriculum Survey. You are asked to participate in a survey about the core curriculum for the College of Sciences https :// purdue.qualtrics.com /SE /?SID =SV_3f2sMjxvGiPOCJ6.
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
Curriculum Survey • You are asked to participate in a survey about the core curriculum for the College of Sciences • https://purdue.qualtrics.com/SE/?SID=SV_3f2sMjxvGiPOCJ6
Goals for CS177 • Teach fundamentals of programming • Python • Show the scientific and interdisciplinary nature of computer science • Demonstrate the breadth of the field of computer science
Office Hours • Luke Ziarek • W 12:00pm – 2:00pm • F 1:00pm – 4:00pm • HAAS 142 • Dr. Martino • M 12:00pm – 1:00pm • T 10:00am -12:00pm • TAs • Will be posted on class website • Additional hours will be scheduled closer to midterms and finals
SCI 210 • Teaming Requirement • Given online via blackboard module • First 6 weeks of the semester • 2 Team Projects • Team Labs
Text Book John Zelle Python Programming: An Introduction to Computer Science(SECOND EDITION) Franklin, Beedle & Associates Inc. We will use other material from the web including somethe book’swebsite
Python Wiki Book • We will also make use of a Wiki Book (online book) • Link provided on course website • Very concise reference • Additional examples and exercises (practice) http://en.wikibooks.org/wiki/Python_Programming
Piazza • Online Forum Software • Link, Registration Information, and Tutorial provided on class website • Post Questions on Piazza • Faster turn around time • Use your classmates as a resource • Registration: • Use your Purdue Login ID • Example: lziareklziarek@purdue.edu
Piazza Policies • Do not post answers on Piazza • This will be considered cheating • Make your questions as general as possible • Avoid posting large amounts of code • Use Tags • #lab1 #project1 #prelab1 • If you are note sure use the #private tag or email • Only instructors and TAs can see (we will make it public)
Grading 5 Projects 25% Weekly Lab 25% 2 midterm exams 25% Final exam 20% Class Participation 5% Class will be graded on a curve Borderline cases are a judgment call
Projects • Due in class at the beginning of course • Hand in will be electronic (similar to labs) • Late policy: • Up to 24h: –20% • Up to 48h: –50% • More than 48h late: no credit • You may discuss the projects (Piazza), but you must do it separately • Two projects will be team projects • Cheating cases sent to Dean of Students office
Exams • No extra materials • No cell phones, calculators, PDAs, etc • Cheating referred to Dean of Students Office • Week 6 and Week 11 exact times TBA
Labs and PreLabs • Starting with Lab 2 we will offer a PreLab • Available on the course wiki • NOT graded • Will contain a review and practice code to help you study/prepare for Lab • PreLabs should take about an hour (or less) • You can bring the PreLab to the lab • Covers material in previous week • Will be made available on Friday of the week prior
Policies • Please read and familiarize yourself with: • http://spaf.cerias.purdue.edu/cpolicy.html • Link provided on course website • You must “sign” or accept the CS policies via the computer science portal • More details on the course website
Software • JES – Robot Labs • Python Development Environment • IDLE - Python • Vanilla Python Note: JES will be introduced in your first robot lab
iClicker • Will be used for in class quizzes (attendance)
Class Structure (weekly) • 2 Lectures • Concepts • 1 Recitation • Review, Libraries, Interactive Coding, additional background • 1 Pre Lab • Review / Practice • 1 Lab • Realizing concepts in code
Class Structure • First 6 Weeks • Boot Camp for Python • Learn the Core Python Language • Rest of the class • Additional CS concepts • Algorithms • Data Structures • Complexity / Recursion / Others • Final Project • Bring everything together (Biology Application)
What is computer science? • The study of process or computation expressed as algorithms. • “Computers are to computer science what telescopes are to astronomy.” – E. Dijkstra
Algorithms • Algorithms are the main focus • Algorithms formally describe computational processes • Programs embody algorithms Note: An algorithm is independent of how a program implements it
Algorithm Example • Remove book from bag • Place book on desk • Open book to first page • Until end of book, Read. Step 4 contains a few complexities. Untilsuggests that there is some repetition and Readcould represent an algorithm also
Up Next • Binary • Programming Languages • Brief Introduction to Python • Statements • Python Math Library
Homework • Read Chapter 1 • Read Course Policies • Signup for Piazza • Register your iclicker
Quick Review • What is Computer Science? • What is an Algorithm? • We know that a program is a collection of implemented algorithms and data structures • How do we develop a program?
The Software Development Process • The process of creating a program is often broken down into stages according to the information that is produced in each phase.
The Software Development Process • Analyze the ProblemFigure out exactly the problem to be solved. Try to understand it as much as possible.
The Software Development Process • Determine SpecificationsDescribe exactly what your program will do. • Don’t worry about how the program will work, but what it will do. • Includes describing the inputs, outputs, and how they relate to one another. • You can think of your assignments as providing a specification
The Software Development Process • Create a Design • Formulate the overall structure of the program. • This is where the how of the program gets worked out. • You choose or develop your own algorithm that meets the specifications.
The Software Development Process • Implement the Design • Translate the design into a computer language. • In this course we will use Python.
The Software Development Process • Test/Debug the Program • Try out your program to see if it worked. • If there are any errors (bugs), they need to be located and fixed. This process is called debugging. • Your goal is to find errors, so try everything that might “break” your program!
The Software Development Process • Maintain the Program • Continue developing the program in response to the needs of your users. • In the real world, most programs are never completely finished – they evolve over time.
What Computers Understand • Modern (digital) computers understand two basic states: • On • Off • This is represented by high and low voltage on a wire.
A single On/Off wire represents 1 bit. • 8 bits are combined together to form a byte. • Representing On/Off as 1/0 is called Binary. • Binary is a base 2 number system • Our every-day numbers are base 10
Binary • In base 10, each place holder or digit position represents a power of 10. • In binary, each place holder represents a power of 2. • The number 135 is broken down as 1*102 + 3*101 +5*100 in base 10
Binary • The base determines how many digits are available. • In base 10 there are ten digits (0 … 9) • In base 2 there are two digits (0 or 1) • The binary number 101 is broken down as 1*22 + 0*21 +1*20 or 4+1=5 (converted to base 10)
Binary • Despite having a different base, arithmetic is the same • Add each column and carry digits • 1 + 1 = 10 as the 1 is carried • 101 + 101 = • 1010