In the beginning… software

Slides:



Advertisements
Similar presentations
compilers and interpreters
Advertisements

Karel – Making More Complex Decisions IF / THEN / ELSE IF THEN BEGIN Instructions END ELSE BEGIN Instructions END Do these when test = False Do these when.
1 Note: Original slides provided by and modified for Mr. Smith’s AP Computer Science A classwww.apComputerScience.com.
1 of 3 Karel Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.
Nested If Statements While Loops
Murphy’s Laws. Things are more complex than they seem to be. Things take longer than expected. Things cost more than expected. If something can go wrong,
Computer Basics Dayton Metro Library Place photo here May 20, 2015.
You ARE NOT ALLOWED To Copy Files!!!. You ARE NOT ALLOWED To Be Told What to Write in the Program.
Karel The Robot Nested If Statements While Loops Copyright © 2008 by Helene G. Kershner.
Karel the Robot -- ITERATE Problem Statement: Karel is told to “take a walk around the block!” Revise Algorithm: Define move ahead 5 streets Define turnright.
How do we make our HelloTester.java program do something? The java in our HelloTester.java file won’t do anything by itself. We need to tell the computer.
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Programming in easyC.
Karel The Robot In the beginning… software. Karel the Robot  All robots are controlled by software  Artificially intelligent robots that can “think”
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Robot? What’s a Robot? Introducing Karel-the-Robot.
AlgoTutor Tutorial (3) Program Pad J. Yoo, S. Yoo, C. Pettey, S. Seo, and Z. Dong MTSU Computer Science Department Making the transition from the algorithm.
PYTHON: LESSON 1 Catherine and Annie. WHAT IS PYTHON ANYWAY?  Python is a programming language.  But what’s a programming language?  It’s a language.
Karel JRobot Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.
Ch. 2 1 Karel – Primitive Instructions Basic tools with which all problems are solved (analogies: LeftSpinngingRobot, RightSpinningRobot, GuardRobot, etc)
Karel J Robot An introduction to BlueJ and Object- Oriented Programming.
1 Classes begin with capital letters (i.e. UrRobot). Methods, objects, and variable names begin with lower case (camelCase) Use indentation to line up.
1 Note: Original slides provided by and modified for Mr. Smith’s AP Computer Science A classwww.apComputerScience.com.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
Karel J. Robot A Gentle Introduction to the Art of Object Oriented Programming.
Karel the Robot A Gentle Introduction to the Art of Programming.
Programming Errors Lexical errors – occur whenever Karel reads a word that is not in his vocabulary. Example in English: We are asking directions and instead.
Thanks to Dr. Kris Schindler for this (and all Karel the Robot slides)
Moving Around in Scratch The Basics… -You do want to have Scratch open as you will be creating a program. -Follow the instructions and if you have questions.
Karel J. Robot Tool for learning OOP (Lecture covers Ch. 1 and 2)
1 Karel – Chapter 6 Instructions That Repeat Note: Original slides provided by and modified for Mr. Smith’s AP Computer Science.
15-100: Introduction to Programming w/ Java * Ananda Gunawardena -- Lecture – School of Computer Science – Phone : (x81559) – Office: Wean Hall.
Chapter 5.  We’ve been using UrRobot – knows only 5 things  Let’s now use a new type of Robot: Robot!  i.e. – public class MileMover extends Robot.
Introduction to OOP in VB.NET using Robots ACSE Conference, Nov 2004 Michael Devoy Monsignor Doyle C.S.S., Cambridge
You will need Dev C++ to help you with this project. If you do not already have this programming tool on your device you can visit
Extending Karel’s Vocabulary This PPT originated with Dr. Judy Hankins Modifications have been done by Dr. Untch & Dr. Cripps.
1 Note: Original slides provided by and modified for Mr. Smith’s AP Computer Science A classwww.apComputerScience.com.
Programming in Karel Eric Roberts CS 106A January 6, 2016.
Ch. 2 1 Karel – Primitive Instructions Basic tools with which all problems are solved (analogies: carpentry, geometry) –move() –turnLeft() –putBeeper()
Karel J. Robot Chapter 6 Instructions That Repeat.
Karel the Robot – Review Primitive Commands move pickbeeper putbeeper turnleft turnoff Karel’s program statements are separated by a semicolon (;) Copyright.
Karel the Robot – Review Primitive Commands move pickbeeper putbeeper turnleft Turnoff Karel’s program statements are separated by a semicolon (;) Copyright.
Compiler Errors Syntax error Lexical Can not resolve/find symbol Can not be applied Execution error Oh wait, a run time error Intent error It ran, but.
Karel the Robot – Review Primitive Commands move pickbeeper putbeeper turnleft Turnoff Karel’s program statements are separated by a semicolon (;) Copyright.
Software Development Languages and Environments. Computer Languages Just as there are many human languages, there are many computer programming languages.
Karel J. Robot Chapter 6 Instructions That Repeat.
Programming Language Basics. What is a Programming Language? “A computer, human-created language used to write instructions for a computer.” “An artificial.
Welcome to the Basic Microsoft Word Guide. Before you start this Guide, you will need to complete “Basic Computer”; “Basic Windows” and know how to type.
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
Karel – Primitive Instructions
Eric Roberts and Jerry Cain
Copyright © 2008 by Helene G. Kershner
Copyright © 2008 by Helene G. Kershner
Karel – Primitive Instructions
Karel J Robot.
Dayton Metro Library Computer Basics September 19, 2018
Graph Paper Programming
Karel the Robot – Making Decisions
Dayton Metro Library Place photo here Computer Basics December 8, 2018.
slides courtesy of Eric Roberts
Algorithm and Ambiguity
Programming Language Basics
ICT Gaming Lesson 2.
Nested If Statements While Loops
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
CSE 111 Karel the Robot.
Karel – Primitive Instructions
Downloading to the NXT requires the correct hardware setup
Programming Logic and Design Eighth Edition
Presentation transcript:

In the beginning… software Karel The Robot In the beginning… software

Karel the Robot All robots are controlled by software Artificially intelligent robots that can “think” minimally by themselves is still an infant science. Even the most functional of industrial arm robots, or devices we think of as robots, require software and the human programmer to work. There are some very sophisticated “robots” Robots that perform surgery Robots that walk on the moon Robotic like limbs (arms and legs) All of these require human written software and often have human controllers.

Karel the Robot Robot Games – Robot Olympics? http://www.youtube.com/watch?v=R8HrM7kleQI&eurl=http://www.robogames.net/

Karel the Robot Karel is a software agent that you as the programmer move around a grid. Karel can only perform a handful of tasks. Karel’s only “understands” five (5) words move turnleft putbeeper pickbeeper turnoff Karel uses this limited vocabulary to move around its world.

Karel the Robot – Initial World View Karel is an arrow shaped “cursor”!

Karel the Robot – Initial World View Tour Initial World is the starting place. Into this World we enter Walls and Beepers Using Walls and Beepers we develop tasks we want Karel to accomplish What do the buttons mean? Shortcuts and About buttons Load World Save World Clear World Compass Directions Number of Beepers and Beepers in Bag

Karel the Robot – World View Putting Walls and Beepers in Karel’s World The easiest way to remember what to do is to click on Shortcuts

Karel the Robot – World View Create a “World” Give Karel a task to complete Command Karel to complete this task. Task = Write a Program

Karel the Robot – Program View Open Program New Program Edit Program Save Program Compile Save As Print Program Abort Changes

Karel the Robot – New Program Pick a name, pick one that makes sense in context

Karel the Robot – Program View Once your program has a name you can begin to COMMAND Karel to do things.

Karel the Robot -- Writing a First Program What is a Program? A program is a step-by-step set of instructions that solve a problem. What’s the problem we want Karel to solve? Go out into the “World” and retrieve the Beeper. There is no single way to write any program There are simple ways There are efficient ways There are very S L O W and inefficient ways As long as it solves the problem it is a program.

Karel the Robot

Karel the Robot

Karel the Robot

Karel the Robot – Program View Enter the COMMANDs from Karel’s limited vocabulary move turnleft pickbeeper putbeeper turnoff Every statement in Karel’s language ends in a semicolon ;;;;;;;;;

Karel the Robot – Writing a Program

Karel the Robot – syntax errors Karel tries to tell you where your error is located. All you know for sure is that Karel got confused somewhere around the line it is showing you.

Karel the Robot This shows that the program will be processed in order from top to bottom. Just because it Compiled does not mean it will work. To Compile a program is to translate it from “English” into the 0s and 1s that the computer understands.

Karel the Robot Create a “World” Write a program to solve a problem Compile the program and remove all syntax errors (errors in spelling and grammar) EXECUTE the program Click the Execute button Load the “World” by hitting the Initialize button Click Run and see what happens.

Karel the Robot When Karel stops because the program told it to stop, the words “turned-off” appear in the little window. When Karel stops because the program asked Karel to do something it cannot do the words “error-shutoff” appear in the little window. An error-shuttoff means Karel has refused to follow the instructions because it has been asked to do something unconscionable.