Presentation is loading. Please wait.

Presentation is loading. Please wait.

Topic: Introduction to Computing Science and Programming + Algorithm

Similar presentations


Presentation on theme: "Topic: Introduction to Computing Science and Programming + Algorithm"— Presentation transcript:

1 Topic: Introduction to Computing Science and Programming + Algorithm
CMPT 120 Topic: Introduction to Computing Science and Programming + Algorithm

2 Last Lecture Introduced the course Little activity -> thank you!
What this course is about Its resources Little activity -> thank you! Some questions Our expectations How to get ready for next lecture How to participate during lecture If we are on the waiting list …

3 Today’s Menu Course Title: “Introduction to Computing Science and Programming 1” This slide is from our Lecture 1.

4 Learning Outcomes At the end of this course, a student will be able to: Describe fundamental concepts pertaining to computing science Computing science Problem solving Algorithm Decomposition

5 i-clicker – Practice Session
About our 2 readings and more

6 What is Computing Science?
Study of computation -> all aspects of problem solving -> a.k.a. computational thinking Design and analysis of algorithms Formalization of algorithms as programs Development of computational devices (e.g.: computers) for executing those programs

7 We can hear what people have to say …
… about what Computer Science is! -> Let’s follow some of the links listed under Resources on our course web site: What is Computing Science? from Rochester Institute of Technology (video) What is Computing Science? from code.org (video)

8 Computer versus Computing
Computer: a tool “Despite its name, a significant amount of computer science does not involve the study of computers themselves.” Computing: field of study According to Computing = Computation Reference:

9 Subfields of Computing Science
Will come back to this topic at end of semester Links listed under Resources on our course web site: Description of Computing Science from Wiki Areas of Research at SFU School of Computing Science

10 What is Programming?

11 Problem Solving Process
State the problem a) Design solution(s) to problem -> solution is expressed as an algorithm b) Identify data involved in problem input Structure and represent (abstract) data into algorithms/programs output Analyze the algorithm Is it effective? Is it efficient? Implement algorithm into a computer program Test program Does it execute (run)? Does it solve the problem?

12 Problem Solving Process – Example
There is no more milk. Data: milk Solution: Buy more milk. “Implement” the solution Hum… can I??? Its describing a solution to the problem without details.

13 Decomposition What if the algorithm is not detailed enough to implement it and solve the problem? Then we need to decompose it into “finer”, i.e., more detailed steps Example: Buy milk Now, we can “implement” the solution since we have sufficient details.

14 Problem Solving Process - Activity
State the problem Design solution(s) to problem -> algorithm (input, internal data, output) Analyzing the algorithm (effective?/efficient?) Implement the algorithm Have we solve the problem? Problem: Data: Algorithm:  Once we apply the algorithm, is the problem solved?

15 Algorithm - Definition
A finite sequenced set of unambiguous steps that, once executed, produces a result Finite: This set of steps executes in a finite amount of time i.e. it should finish at some point Sequenced: The steps must be executed in the order in which they are listed Unambiguous: Each step is clear Result: This result solves the initial problem The algorithm also describes The input (data) it is expecting Internal data it is using The output (result) it is producing

16 More about algorithm Please, see the video “Algorithms from Khan Academy” listed under Resources on our home course web page

17 How do we express an algorithm?
Use a natural language like English Example: Problem: Let’s figure out our course final grade Take all the grades we obtained in course activities (e.g., assignments, exams, etc…) Compute each grade as a % of final grade

18 How do we express an algorithm?
Use a mix of natural language and computer language -> pseudocode Example: Problem: Let’s figure out our course final grade Set final grade to 0 For each grade Input the grade Input the grade’s maximum (out of) (gradedOutOf) Input the grade’s % of the final grade (percentOfFinalGrade) Compute the new grade: (grade * percentOfFinalGrade ) / gradedOutOf Keep a running total: final grade = final grade + new grade Print the final grade

19 How do we express an algorithm?
Start Set final grade to 0 Use a flowchart Legend: Have Yes All grades read yet? No Input the grade Start and end of algorithm Input the grade’s maximum Processing Input the grade’s % of the final grade Input or Output Compute the new grade e Decision Keep a running Total for final grade Flow of execution Print final grade End

20 How do we express an algorithm?
4. In a diagram Please, see ”Here is an awesome way of expressing an algorithm (Way #4)“ listed under Resources on our home course web page 5. In a video (verbal instructions and pictures)

21 Why do we need algorithms?

22 Summary i-clicker Practice Session
Computing Science -> Problem solving Programming Problem Solving Process Algorithm Decomposition How to express them -> 5 ways Why do we need them

23 Next Lecture Demo: Illustrate the Problem Solving Process
Experience what it means to create a computer program Implement algorithm into computer program State problem Design algorithm + Identify data Test it


Download ppt "Topic: Introduction to Computing Science and Programming + Algorithm"

Similar presentations


Ads by Google