170 likes | 191 Views
Dive into the fundamentals of computer science, from understanding problems to designing and implementing solutions using Python. Enroll now and master problem-solving with computers!
E N D
COMP 171Principles of Computer Science I John Barr
Sakai for Class Information • Syllabus • Announcements • Assignments • Office and TA hours • Other resources
Online, Interactive Textbook learn.zybooks.com • Enter zyBookcode: • ITHACACOMP17100Spring2018 • Subscribe • A subscription is $58 and will last until May 24, 2018.
What is Computer Science? • Computer Science is Problem Solving • Understanding the problem/challenge • Breaking down the problem into solvable pieces • Using computers to solve the problem
What is Computer Science? • Computer Science is Problem Solving • Understanding the problem/challenge • Breaking down the problem into solvable pieces • Using computers to solve the problem
What is Computer Science? • Computer Science is Problem Solving • Understanding the problem/challenge • Breaking down the problem into solvable pieces • Using computers to solve the problem Design Implementation
What is Computer Science? • Computer Science is Problem Solving • Take a client request • Design the project, including a problem statement and an algorithm. • Implement the project using python to make a program. • Test your program to ensure it works correctly and it does what the client wants.
Understanding the problem • Client Request: • What percentage of students at a college are a given major? • Project Statement: • Inputs: • Outputs: • Examples: • Domain Knowledge: • Outside information necessary to complete the project
Understanding the problem • Client Request: • What percentage of students at a college are a given major? • Project Statement: • Inputs:# student in major, total # students • Outputs: % students in major • Examples: 5 majors, 100 students, 15% 24 majors, 29 students, 82.75% • Domain Knowledge: % is portion/total * 100 can't divide by 0
Understanding the problem • Client Request: • What percentage of students at a college are a given major? • Project Statement: • Inputs:# student in major, total # students • Outputs: % students in major • Examples: 5 majors, 100 students, 15% 24 majors, 29 students, 82.75% • Domain Knowledge: % is portion/total * 100 can't divide by 0 • Algorithm?
Breaking Down The Problem • An Algorithm • Step-by-step procedure to solve the problem from beginning (inputs) to end (outputs) • Explain how to solve the problem to a person that knows nothing about the solution, or computers!
Breaking Down the Problem • Client Request: • What percentage of students at a college are a given major? • Project Statement: • Inputs: # student in major, total # students • Outputs: % students in major • Examples: 5 majors, 100 students, 15% 24 majors, 29 students, 82.75% • Domain Knowledge: % is portion/total * 100 can't divide by 0 • Algorithm – set of steps to solve the problem
Breaking Down the Problem • Client Request: • What percentage of students at a college are a given major? • Project Statement: • Inputs: # student in major, total # students • Outputs: % students in major • Examples: 5 majors, 100 students, 15% 24 majors, 29 students, 82.75% • Domain Knowledge: % is portion/total * 100 can't divide by 0 • Algorithm – set of steps to solve the problem • if number of students is 0, the answer is 0 • else divide the number of majors by the total number of students • multiply the answer by 100
What is Computer Science? • Computer Science is Problem Solving • Understanding the problem/challenge • Breaking down the problem into solvable pieces • Using the tools you have to solve the problem Design Implementation - we'll get there…
Using computers to solve the problem • For CS, algorithms need to eventually be expressed in a form the computer can understand. • Programming Language • Your way to tell the computer your algorithm (your solution) • Computer will only do what you tell it to do
Our Course • Learn to solve problems with computers by clarifying the problems, creating algorithms, and translating those algorithms into Python code. • Give the computer instructions to solve instances of the problem for us.