CS 101 – Oct. 5 Computer problem solving Chapter 6: read pp. 148-174 Problem-solving procedure Structure of a solution Examples!

Slides:



Advertisements
Similar presentations
Classroom Cookbook 1. Research your cultural history Ex: Are you Irish, German, Native American? You may represent more than one culture! 2. Find a recipe.
Advertisements

Casserole A casserole is a tasty blend of cooked ingredients that are heated together to develop flavor.
There are three main parts to a casserole:
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Recipes. Tiramisu Strawberry Pudding Fried rice French toast.
Programming TBE 540 Farah Fisher. Objectives After viewing this presentation, the learner will be able to… Given a task, create pseudocode Given pseudocode,
CMPT 120 Introduction to Computer Science and Programming I Chris Schmidt.
CMT1000: Introduction to Programming Ed Currie Lecture 2A: Pizza.
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
Chapter 1 Program Design
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Basic Computer Skills Seminar
Cooking for One or Two Cooking made simple. Making Mealtime Enjoyable Again Choose recipes with fewer ingredients- Saves you time and energy! Pick your.
Why is it important to read through and understand all parts of the recipe?
 Name tag  Notebook  Pen  No food or drink in my class.  If you are late to class, you will stay after class with me for five minutes.  When I.
Transition Words Cake Recipe.
Procedure Text.
POLISH RECIPES collected by Maksym Chudzicki from III b and Julia Chudzicka 6 b.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Lecture 1 Introduction to Java MIT- AITI 2004 What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word.
Food. Are you hungry? I’m thinking of… A: I’m thinking of a food you eat in the morning. B: Cereal.
Process Writing: Explanatory Essays Or “How To” Essays.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
CS 102 Computers In Context (Multimedia)‏ 01 / 23 / 2009 Instructor: Michael Eckmann.
Introduction to Programming ICS2O Findlay. Learning Goals  We will learn  The definitions of a computer, program and programming language.  The different.
Chapter 1 Program Development Asserting Java © Rick Mercer.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Lecture 1 Introduction to Java MIT-AITI Ethiopia 2004.
Finnish Christmas food Recipes Carrot casserole Rosolli.
Monstrous Meatballs with Ragu Sauce & Spaghetti. Ingredients for the Ragu Sauce: 1 onion, 1 clove garlic, 1 carrot, 1 celery, 1 bay leaf 400g can tomatoes,
What you will need Peas Carrots Potatoes Oxo Mince Meat Onion.
CS CS Computing for Business Instructor:David Tucker GTA:Batul Mirza.
Vegetable burgers (Vegetarian) 2 portions: 1 small onion, rasped 2 carrots, rasped 2 potatoes, rasped 100 g celery root, rasped 1 egg 3 regular spoon whole.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
CS 111 – Oct. 20 Most essential skill in IT: problem solving using the computer –Telling the machine exactly what we want it to do. –Also: making sure.
Chapter 10.7 Notes: Solve Quadratic Equations by the Quadratic Formula Goal: You will solve quadratic equations by using the Quadratic Formula.
CS 111 – Sept. 15 Chapter 2 – Manipulating data by performing instructions “What is going on in the CPU?” Commitment: –Please read through section 2.3.
© British Nutrition Foundation 2006www.nutrition.org.uk/cookclub Fish Pie.
Crown copyright 2007 Shepherd’s pie Session: 16.
Casserole A casserole is a tasty blend of cooked ingredients that are heated together to develop flavor.
Thanksgiving. Thanksgiving History IndiansPilgrims.
Intermediate 2 Computing Unit 2 - Software Development.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Introduction to design and analysis algorithm
RECIPE Sirloin in cream sauce (6 portions) The Czech Republic.
BEEF STEW. PERSON 1 Put 1 T oil in a saucepan- turn pan on to medium Gather ½ lb beef ( come up to the front with a plate In a small bowl add 2 T of flour.
By: Jacob Seymour, Molly Staszak, and Julia Concolino China.
Procedure have three definition :  Texts that explain how something works or how to use instruction / operation manuals e.g. how to use the video, the.
CS 101 – Oct. 7 Solving simple problems: create algorithm Structure of solution –Sequence of steps (1,2,3….) –Sometimes we need to make a choice –Sometimes.
The Casserole Competition This will be your opportunity to compete against other kitchen groups!
PROCEDURE What is A PROCEDURE? A procedure is a piece of text that tells how to do something. Its purpose is to provide instructions for making something,
L/O/G/O PROCEDURAL TEXT. Procedural text is a text that is explaining about the way how to do, how to get or how to make something.
There is an old adage that says "if you can read you can cook." That's only true after you've had a little experience! Cooking terms can be confusing,
Casseroles. What is a casserole? A blend of cooked ingredients that are heated together to develop flavor.
The recipe book of… Optional headtitle Greek salad soup English cake Baked potatoes chicken in the oven Orange cake Cheese cake carrot cake pizza homemade.
Bacon and French Ice cream Cake and Bread and Macaroni and chips Hamburger and eggs cheese JellyFish and Peanut butter and fries butter.
Demonstration: Cottage Pie YEAR 10 FOOD TECHNOLOGY GCSE.
Writing a Recipe.
Introduction to Computer Science and Programming I Chris Schmidt
Software Development Expansion of topics page 28 in Zelle
CSCI-235 Micro-Computer Applications
Proportional Problems 2 – RECIPES
Introduction CSE 1310 – Introduction to Computers and Programming
Chapter 1 Program Development
Session: 16 Shepherd’s pie © Crown copyright 2007.
Cooking Terms The Language of the Recipe
Shepherd’s pie Ingredients 1 onion 1 carrot 3 medium potatoes (700g)
Ingredients ingredients [noun - plural] the foods that are needed to cook a certain dish This dish tastes very nice because we used fresh ingredients.
Presentation transcript:

CS 101 – Oct. 5 Computer problem solving Chapter 6: read pp Problem-solving procedure Structure of a solution Examples!

Review: what is CS ? The study of how we … –Solve problems –Represent information In problem solving, we’d like: –Find systematic ways of going about solution –Correct, quick and informative solutions. Information can be: –Different types: numbers, text, images, sound, the software itself –The input and output to a computer program

Why create software? Computational power –Excel is limited to so many rows/columns –Can convert data to images –Can create games and useful applications –With one “language”, can solve virtually any problem. Built-in features of languages –Many common calculations are pre-defined for you such as sorting, opening files, surfing the Web, creating a button, etc.

Software Powerful! –We get to tell the machine exactly what we want. –Sometimes, existing programs like Excel or Photoshop are not enough. Program = sequence of instructions for CPU to obey. –Works like a recipe. –A recipe has: ingredients, steps, and result is food! –A program has: input, calculations, output. When we start to look at programs, be on the lookout for these 3 parts.

Recipes Cooking may be a good analogy, because it’s solving a specific problem “I’m hungry.” What do we see in recipes? Here’s one: –Brown the beef 15 min. Drain grease. –Dice carrot, celery, onion (aka “mirepoix”) –Cut up and boil 6 potatoes until soft. –Mash potatoes –Add flour, spices, sauce, mirepoix to beef. –Put meat mixture into casserole, top with potatoes. –Bake in oven at 400 for 30 minutes.

Recipes (2) A computer program has some of the same elements as a recipe… In recipes we see: –Ingredients (the “nouns” of the problem) –Steps to perform (the “verbs”) –In some steps, we continue/wait for something –Although it’s not obvious, sometimes we check things: Are potatoes fully mashed? Should I add more _____ to the mixture?

Recipes (3) But we don’t eat the same stuff every day. Once we know a few recipes, we can put together a menu for choices. if (have all ingredients), make Shepherd’s pie. if (no potatoes), just make soup instead. if (no veggies), make hamburger. if (no beef), make pasta. When you view a whole menu as a program, then “making soup” becomes a sub-program. –A large program is composed of several parts. –In industry, sometimes each part implemented by different people. A kitchen may have many chefs.

Problem-solving 1.Understand problem; inputs and outputs 2.Write solution in English “pseudocode” 3.Write code in a programming language 4.Compile 5.Run and test When program works, can refine.

Problems The earliest problems given to a computer were mathematical. Sometimes there is no clean formula –Many equations can’t be solved analytically. For example, cos(x) = x. Need to solve numerically. –Ex. Heat equation is a partial differential equation (PDE). Most PDEs have to be solved numerically. –Ex. Calculating a square root. And even if there is a clean formula, a computer can help you automate the calculations.

Problems (2) “Mathematical” problems may at first sound boring. But they include many useful applications –Ex. Finding directions Other kinds of problems for the computer –Games –Record keeping, managing investments, … –Networking, communication –Multimedia (e.g. image processing) –Of course, much more!