Announcements — Tues., Jan. 19 For next time, read Learning Computing with Robots, chs. 1 and 2. The Blackboard site is up and operational! not much content.

Slides:



Advertisements
Similar presentations
CS 1 with Robots The Algorithm Institute for Personal Robots in Education (IPRE)
Advertisements

Introduction to Programming in C++ John Galletly.
Chapter 1: An Overview of Computers and Programming Languages
© Peter Andreae What is Programming About COMP 102 # T1 Peter Andreae Computer Science Victoria University of Wellington.
Computer Science 121 Scientific Computing Winter 2012.
Python Programming Chapter 1: The way of the program Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Wednesday, 9/4/02, Slide #1 1 CS 106 Intro to CS 1 Wednesday, 9/4/02  Today: Introduction, course information, and basic ideas of computers and programming.
PROBLEM SOLVING What should I wear today? Which sport should I do? Which cell phone is best for me? Which team is probably the winner? Will Euro be raised.
Computer Science 1620 Programming & Problem Solving.
Comp 205: Comparative Programming Languages Imperative Programming Languages Functional Programming Languages Semantics Other Paradigms Lecture notes,
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages Updated by: Dr\Ali-Alnajjar.
Introduction to Programming (in C++) Introduction Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
CS001 Introduction to Programming Day 1 Sujana Jyothi
CS 415: Programming Languages Chapter 1 Aaron Bloomfield Fall 2005.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
History of Programming Languages
Programming Languages CPS120: Introduction to Computer Science Lecture 5.
Object-Oriented Programming in C++
High-Level Programming Languages: C++
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Hello World 2 What does all that mean?.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Computer Science 121 Scientific Computing Winter 2014.
1 Computer Programming. Users vs. Designers Which are you?Which are you? Which do you want to be?Which do you want to be? Do you ever wonder – how does.
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
Computing Science 1P Lecture 21: Friday 20 th April Simon Gay Department of Computing Science University of Glasgow 2006/07.
Instructor: Tina Tian. About me Office: RLC 203A Office Hours: Wednesday 1:30 - 4:30 PM or .
CS161 Topic #21 CS161 Introduction to Computer Science Topic #2.
©Xiaoying Gao, Peter Andreae First Java Program COMP 102 #2 2014T2 Xiaoying Sharon Gao Computer Science Victoria University of Wellington.
First Java Program COMP 102 #2 2015T2 Xiaoying Sharon Gao Computer Science Victoria University of Wellington.
1 Programming Language History and Evolution In Text: Chapter 2.
Building Java Programs Chapter 1 Introduction to Java Programming Copyright (c) Pearson All rights reserved.
Chapter 1 Introduction to Computers and C++ Programming Goals: To introduce the fundamental hardware and software components of a computer system To introduce.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 October 20, October 20, 2015October 20, 2015October 20,
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Chapter 12 Computer Programming. Chapter Contents Chapter 12: Computer Programming 2  Section A: Programming Basics  Section B: Procedural Programming.
CS 345: Programming Language Paradigms Chris Brooks HR 510 MWF 11:00-12:05.
CS 655: Programming Languages David Evans Office 236A, University of Virginia Computer.
© Peter Andreae What is Programming About COMP 102 # T1 Peter Andreae Computer Science Victoria University of Wellington.
Computing Systems & Programming ECE Fundamental Concepts Chapter 1 Engineering Problem Solving.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Programming Languages
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Chapter 1: Introduction to Computers and Programming.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Engineering Algorithms, Compilers, & Lifecycle.
C++ Programming Chapter 1 Programming & Programs.
Programming Language Paradigms ITSK2314 Lecture 3.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
History. Development Driven by Function Functions of a Programming Language –To describe computation for use by computers –To describe computation and.
CPS120 Introduction to Computer Science High Level Language: Paradigms.
Functional Programming Lecture 1 - Introduction Professor Muffy Calder.
PROGRAMMING: What’s It All About?
Introduction to programming languages, Algorithms & flowcharts
COSC 1306 COMPUTER SCIENCE AND PROGRAMMING
Computer Programming (BCT 1113)
Introduction to programming languages, Algorithms & flowcharts
Algorithm and Ambiguity
Introduction to programming languages, Algorithms & flowcharts
Hello World 2 What does all that mean?.
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Algorithm and Ambiguity
Presentation transcript:

Announcements — Tues., Jan. 19 For next time, read Learning Computing with Robots, chs. 1 and 2. The Blackboard site is up and operational! not much content mostly links back to my course homepage Printed copies are available from Graphic Creations 1809 Lake Avenue, Knoxville How to Think Like a Computer Scientist: $20 Learning Computing with Robots: $30 I don’t know if they print copies in advance; you might want to call them ( ) FedEx Office will probably have copies as well (currently in negotiation) CS 102 vs. CS

CS 102 with Robots The Algorithm Slides (with modifications) from Institute for Personal Robots in Education (IPRE)‏

The Algorithm “Algorithm: n. A finite set of unambiguous instructions performed in a prescribed sequence to achieve a goal” — The American Heritage Science Dictionary

The Algorithm Al-Khwarizmi was a Persian mathematician who wrote a book on calculating with Hindu numerals in the 9th century CE. When translated to Latin, a pluralized form of his name (algorismus) became synonymous with a system of calculation.

Pizza Dough Recipe (Algorithm)‏ 1. Gather Ingredients 2. Combine sugar (1tbs), salt (1tbs), olive oil (1tbs), flour (1c) in mixing bowl 3. Turn on mixer 4. Add 1/4 cup of flour 5. If dough comes off the sides go to step 6, otherwise go back to step 4 6. Knead 15 minutes 7. Let rest for at least 45 minutes in warm area  1 dough ball

N-Pizza Dough Algorithm 1.1. Gather Ingredients 2.2. Combine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowl 3.3. Turn on mixer 4.4. Add N/4 cup of flour 5.5. If dough comes off the sides go to step 6, otherwise go back to step Knead 15 minutes 7.7. Let rest for at least 45 minutes in warm area  N dough balls

N-Pizza Dough Algorithm 1. Gather Ingredients 2. Combine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowl 3. Turn on mixer 4. Add N/4 cup of flour 5. If dough comes off the sides go to step 6, otherwise go back to step 4 6. Knead 15 minutes 7. Let rest for at least 45 minutes in warm area Sequence of Statements  N dough balls

N-Pizza Dough Algorithm 1. Gather Ingredients 2. Combine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowl 3. Turn on mixer 4. Add N/4 cup of flour 5. If dough comes off the sides go to step 6, otherwise go back to step 4 6. Knead 15 minutes 7. Let rest for at least 45 minutes in warm area  N dough balls Variable

N-Pizza Dough - Algorithm 1. Gather Ingredients 2. Combine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowl 3. Turn on mixer 4. Add N/4 cup of flour 5. If dough comes off the sides go to step 6, otherwise go back to step 4 6. Knead 15 minutes 7. Let rest for at least 45 minutes in warm area Conditional

N-Pizza Dough - Algorithm 1. Gather Ingredients 2. Combine sugar (N tbs), salt (N tbs), olive oil (N tbs), flour (N c) in mixing bowl 3. Turn on mixer 4. Add N/4 cup of flour 5. If dough comes off the sides go to step 6, otherwise go back to step 4 6. Knead 15 minutes 7. Let rest for at least 45 minutes in warm area Subroutines Mini-algorithms  N dough balls

Programs - Algorithms at Work Programs are the way we communicate with a computer Specify the algorithm This class uses the C++ programming language Rather than pizza dough, we will use a robot as our favorite example

CS 102 with Robots The Way of the Program

Programming languages There are thousands of programming languages! High-level languages: These are some languages I have programmed in: A, Ada, Algol 60, Algol 68, APL, Argot, BASIC, BCPL, Bliss, Chrysalis, COBOL, C++, FORTRAN, FP, GPL, LISP, Mathematica, NetLogo, Pascal, ϕ, PL/M, Prolog, Python, Scheme, Simula 67, Smalltalk, StarLogo, Ω. These are some well-known and popular languages that I have not programmed in: C, C#, Forth, Haskel, Java, MatLab, Miranda, Pearl, PL/I. The point? In your career you will have to learn and use many HLLs! The key skill is how to program You should also be able to pick up new HLLs quickly There are also low-level languages

Interpreters

Compiler

What is a program? A program is a sequence of instructions for performing a computation That is, a precise description of an algorithm Instructions include: input output math testing repetition Programs need to be comprehensible to people as well as computers!

Debugging Compile-time errors Run-time errors Logic errors Experimental debugging (hypothesis testing)

Formal vs. natural languages Natural languages ambiguity redundancy literalness Formal languages Programming languages are formal languages for expressing algorithms

A first program — “Hello World” #include using namespace std; // main: generate some simple output int main () { cout << "Hello, world." << endl; return 0; } Embodiment