1 / 18

Introduction to Computing Science and Programming 1

Learn about the fundamentals of computing science, problem-solving, algorithms, and programming in this introductory course. Become proficient in computer science by the end of the course.

norwoodd
Download Presentation

Introduction to Computing Science and Programming 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CMPT 120 Lecture 2 - Introduction to Computing Science– Problem Solving, Algorithmand Programming

  2. Last Lecture • Introducing the course • What is this course all about? • All we need is … • How is this course going to work? • Little activity -> Thank you! • Our first program! • Q&A • Summary

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

  4. Reading Review • What is the single most important skill for a computer scientist? • Comments and ________ ________ can make your programs much easier for humans to parse. Use them liberally! • What is the difference between a natural language and a formal language?

  5. Unit 0What is Computing Science? • In the first week, we'll talk about what computing science is, where it comes from, why it's awesome, and start to learn about how it works. • You'll get set up with the tools that we'll be using in this class to help you become proficient computer scientists by the end of this course. • By the way, in computing, we count from 0 :)

  6. 1stpart of the course’s title: What is Computing Science? • Study of computation -> all aspects of problem solving • a.k.a. computational thinking Source: https://corporatetrainingmaterials.com/course/Creative_Problem_Solving https://www.sandler.com/blog/bring-problem-prospect-does

  7. BTW: Computing or Computer Science? • “Computing science is as much about computers as astronomy is about telescopes." • From wiki: “Despite its name, a significant amount of computer science does not involve the study of computers themselves.” • Computer: a tool • Computing: field of study

  8. Activity – Solving a Problem • What are the steps we go through when we solve a problem? • Take 5 minutes to … • Pair up • Pick a problem you both have experienced • Identify the steps you go through when you solved your problem

  9. Steps of Problem Solving

  10. What is an algorithm? • A finitesequenced set of unambiguoussteps 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 data it needs in order to work -> input • The result it produces -> output

  11. More about algorithm • Video Algorithmsfrom Khan Academy

  12. Activity - Human meets alien!

  13. How do we express an algorithm? 1. Use a natural language like English • Example– problem: compute final course grade 2. Use a mix of natural language and computer language -> pseudocode • Example– problem: compute final course grade 3. Use a flowchart • Example– problem: compute final course grade 4. In a diagram • Example– problem: build a shelving unit 5. In a video (verbal instructions and pictures) • Example– problem: make tea

  14. Let’s give it a go! – Take 1 • Problem: • Display a greeting on the screen • Solution: • Algorithm in English Comments • Write your 1) header block with a title, a general description of what you’re trying to do, author and date 2) algorithmsteps • All lines should be preceded by a ________ • Code • Translate your algorithm into Python using a new addition to our vocabulary: print. Note the parentheses and quotation marks. These are necessary.

  15. Let’s give it a go! – Take 2 • Problem:

  16. Why do we need algorithms?

  17. Today’s Review • How can I express an algorithm? • How would I display 4 + 7 = 12 on the screen? • What are the steps we performed when we solve a problem? • What do we put in a header? • What would print("Above\nBelow") produce on the screen? • Give an example of an algorithm?

  18. Next Lecture • Introduce Unit 1 – Automation – Chatbots • Can we build chatbots using what we know of Python so far, i.e., print, variables, strings input, lists, modules, etc…? • We shall see 

More Related