Variables and Functions Chapter 3

Size: px
Start display at page:

Download "Variables and Functions Chapter 3"

Transcription

1 Variables and Functions Chapter 3 3-1

2 Variables Named storage location in computer s memory Programs may need to store data when running o Stored in a variable Types of data that can be stored o Local variables o Parameter variables o Class-level variables o World-level variables 3-2

3 Variable Types Local variables o Belongs to a specific method o Only used in that method o Variables cease to exist when method stops Parameter variables o Holds argument that is passed to a called method Class-level variables o Variable that belong to a specific object World-level variables o Variable that belongs to the world 3-3

4 Creating Local Variables Local variables belong to a specific method (such as world.my first method) Create variable by clicking on create new variable in desired method Variables require 3 things o o o Name Type Initial value name type value 3-4

5 Names, Types and Initial Values Variable Names Must be unique within the method Should be meaningful and reflect the variable s purpose Named using camelcase Variable Types Numbers, Boolean, Objects, Other (such as String, Color, or Sound) Initial Value Value initially stored in the variable 3-5

6 Variables Tile appearance shows the type of variable Numbers, Boolean, Objects, String Variable declaration - creating a variable variable area 3-6

7 Variable Assignment Variables have an initial value Initial value held until a different value is assigned New values can be assigned while the method is running o Use Set instructions o Done by dragging variable tile into Methods Editor 3-7

8 Checkpoint What is a variable? What are three things that must be specified when creating a new variable? In what part of the Method Editor do variable tiles appear? What do the characters 123 appearing on a variable tile tell you? How do you create a set instruction for a variable? 3-8

9 Function Asks a question o Checks a condition o Computes a value Used to get information about o Properties of objects Is snowwoman's face red? o Relationship of one object to another What is distance between lunar robot and rock? o A current condition What keyboard key was pressed?

10 World Level Primitive Functions List of functions categories o Boolean logic o Math o Random o String o Ask user o Mouse o Time o Advanced math o Other 3-10

11 Value What a function returns after it o Asks question o Performs computation Type of value depends on kind of function o In lunar example What is distance of robot to rock? o Number value is expected to be returned Whole number ex: 3 meters Fractional value, ex: 1.2 meters

12 Types of Values Number o As in example Boolean o true, false String o Slithy Toves Object o snowman, helicopter Position in world o (0, 0, 0) center of an Alice world

13 Asking User for Input World has three primitive functions that ask for user input Each function is displayed in a dialog box Is it Yes or No? 3-13

14 Adding Question for Number

15 Class Primitive Object Functions Objects have different primitive functions from the world o Proximity o Size o Spatial relation o Point of view o Other Object primitive proximity functions

16 Using Function distance to Built-in distance to function o Determines distance from center of one object to center of another object o Better than guessing distance to object An Alice function is not a "stand-alone" instruction o It is nested within another instruction

17 Checkpoint What makes a function different from a method? How do you see a list of the functions an object has? What are the three primitive world functions that ask the user to input a value? What are some class level functions? What does the primitive distance to function do? 3-17

18 Creating Math Expressions Math Operators are used to create math expressions Math expressions perform a calculation and return a value Simple math expression o Operator Description + Addition - Subtraction * Multiplication / Division o Value returned is 14 Operands appear to the right and left of an operator o Example with variables payrate and hoursworked payrate * hoursworked 3-18

19 Determining Distance Camera angle influences our perception of scene We need assistance with determining distance Example: How many meters does robot need to walk to reach rocks where alien is hiding? o Can use pointofview property Primitive function

20 Avoiding Collisions When program is run, robot collides with rock o Distance between two objects is measured centerto-center One way to avoid a collision o Reduce calculated distance to object o Use expression to subtract small number (1 or 2) from distance

21 Expressions in Arguments Math expressions can be used in place of o Fixed value o To adjust value returned by function Click down arrow to get math operation o Adjusts distance to move to not collide with rock

22 Adding Math Expression in Alice 3-22

23 Subtracting Functions Two meters subtracted from distance is arbitrary To be more precise, subtract width of rock o But still not accurate Resulting expression subtracts value of one function from value of another function

24 More Precision The most accurate way to determine distance and to avoid collision o Add half width of both objects subtract from distance Be careful of excessive parentheses

25 Checkpoint What do the following operators do in most programming languages? o + - * / What does a math expression do? When you use the move to instruction to move one object to another object, why do they collide? o What are multiple methods you can use to avoid this? When can an object be driven into the ground or above the ground when using move to or move toward instructions? 3-25

26 Working with Strings and Text A string is a sequence of characters Strings represent o Names o Addresses o Messages o etc. 3-26

27 Asking User to Enter a String World s ask user function can ask user to enter string Function returns the text that the user enters Example displays what user entered in dialog bubble Defines string variable called name Puts contents of name variable in bubble Asks user for name Stores in variable name 3-27

28 Joining Strings String Concatenation o Joins string a with string b o Strings a and b are arguments o Does not change the values of strings a or b World function o a joined with b Drag a joined with b from string section in World function to where you want to join strings 3-28

29 Example of a joined with b Hello joined with was only thing added 3-29

30 Converting Numbers to Strings Sometimes you need to display numbers to user Number needs to be converted to string first Use world functionwhat as a string

31 Example of what as a string 3-31

32 3D Text can be added to Alice worlds Found at end of the local gallery Pop up window appears after clicking on it Enter text and font style 3-32

33 Homework Read chapter 3 Do tutorials o Tutorial 3-1 Creating and using a variable, p 116 o Tutorial 3-2, Creating a set instruction, p. 118 o Tutorial 3-3, Calling an ask user function, p. 122 o Tutorial 3-4, Using a proximity function, p. 127 o Tutorial 3-5 Using math to avoid collisions, p 132 o Tutorial 3-6, Converting a number variable to a string, p. 141 Answer questions in handout Do lab assignments after handing in answered questions Due one week after assigned with 1 week grace

World-level Classes and Methods. Chapter 6

World-level Classes and Methods. Chapter 6 World-level Classes and Methods Chapter 6 Programs Grow Code seems to grow and grow Makes program more difficult to read and process in our minds Games and other software can have thousands, even millions

More information

Decision Structures. Chapter 4

Decision Structures. Chapter 4 Decision Structures Chapter 4 Chapter 4 Objectives To understand: o What values can be stored in a Boolean variable o What sequence structures are and when used o What decision structures are and when

More information

Class-level Methods. Chapter 6 part 1

Class-level Methods. Chapter 6 part 1 Class-level Methods Chapter 6 part 1 Classes and Objects Classes o In Alice, classes are predefined as 3D models Objects o An object is an instance of a class Class: Frog (Uppercase first letter) Objects:

More information

Getting Started with Java Using Alice. 1 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Getting Started with Java Using Alice. 1 Copyright 2013, Oracle and/or its affiliates. All rights reserved. Getting Started with Java Using Alice 1 Copyright 2013, Oracle and/or its affiliates. All rights Objectives This lesson covers the following objectives: Use the IF control structure to effect execution

More information

IT Introduction to Programming for I.T. Midterm Exam #1 - Prof. Reed Spring 2008

IT Introduction to Programming for I.T. Midterm Exam #1 - Prof. Reed Spring 2008 IT 101 - Introduction to Programming for I.T. Midterm Exam #1 - Prof. Reed Spring 2008 What is your name?: (0 points) There are two sections: I. True/False..................... 20 points; ( 10 questions,

More information

Plotting Points. By Francine Wolfe Professor Susan Rodger Duke University June 2010

Plotting Points. By Francine Wolfe Professor Susan Rodger Duke University June 2010 Plotting Points By Francine Wolfe Professor Susan Rodger Duke University June 2010 Description This tutorial will show you how to create a game where the player has to plot points on a graph. The method

More information

This tutorial will teach you about operators. Operators are symbols that are used to represent an actions used in programming.

This tutorial will teach you about operators. Operators are symbols that are used to represent an actions used in programming. OPERATORS This tutorial will teach you about operators. s are symbols that are used to represent an actions used in programming. Here is the link to the tutorial on TouchDevelop: http://tdev.ly/qwausldq

More information

Choose the best answer from each of the following; answer A for True, B for False for any T/F questions.

Choose the best answer from each of the following; answer A for True, B for False for any T/F questions. Alice Quiz: Chapters 1-3 Choose the best answer from each of the following; answer A for True, B for False for any T/F questions. 1) According to the Alice text, learning to program makes you a computer

More information

Alice: A Free 3D Animation World for Teaching Programming

Alice: A Free 3D Animation World for Teaching Programming Alice: A Free 3D Animation World for Teaching Programming Barbara Ericson ericson@cc.gatech.edu Oct 2005 (Slightly adapted by Håkan Jonsson) Pick a World Playing the Movie! Click on the Examples tab "

More information

Peeking into Computer Science Alice Lab Manual. Lab Manual. Programming

Peeking into Computer Science Alice Lab Manual. Lab Manual. Programming Lab Manual Programming 1 Alice Lab 1: Introduction 2 Table of Contents Lab 1: Introduction... 5 The Alice Interface... 6 Objects... 6 Lab 2: Sequential & Parallel Execution... 15 Do in order... 15 Do together...

More information

Events (Alice In Action, Ch 6)

Events (Alice In Action, Ch 6) CS 101 Lecture 27 Events (Alice In Action, Ch 6) 31 July 2013 Slides Credit: Joel Adams, Alice in Action Objectives Create new events in Alice Create handler methods for Alice events Use events to build

More information

Classes, Objects, and World-level Methods. Alice

Classes, Objects, and World-level Methods. Alice Classes, Objects, and World-level Methods Alice Larger Programs As you become more skilled in writing programs, you will find that programs quickly increase to many, many lines of code. Games and other

More information

Events (Alice In Ac.on, Ch 6)

Events (Alice In Ac.on, Ch 6) CS 101 Lecture 26/27 Events (Alice In Ac.on, Ch 6) Slides Credit: Joel Adams, Alice in Action Objectives Programming to respond to events Create new events in Alice Create handler methods for Alice events

More information

Midterms Save the Dates!

Midterms Save the Dates! University of British Columbia CPSC 111, Intro to Computation Alan J. Hu Primitive Data Types Arithmetic Operators Readings Your textbook is Big Java (3rd Ed). This Week s Reading: Ch 2.1-2.5, Ch 4.1-4.2.

More information

Class #1. introduction, functions, variables, conditionals

Class #1. introduction, functions, variables, conditionals Class #1 introduction, functions, variables, conditionals what is processing hello world tour of the grounds functions,expressions, statements console/debugging drawing data types and variables decisions

More information

Gaddis: Starting Out with Alice Test Bank Chapter Two 1 Chapter Two

Gaddis: Starting Out with Alice Test Bank Chapter Two 1 Chapter Two Gaddis: Starting Out with Alice Test Bank Chapter Two 1 Chapter Two MULTIPLE CHOICE 1. What is the name of the default world method that automatically runs when an Alice program is executed? a. the first

More information

Duration 30 minutes Notes This tutorial was built using Alice

Duration 30 minutes Notes This tutorial was built using Alice Tutorial 1: Get Started with Alice 3 Overview In this tutorial, you will become familiar with the basic features of Alice 3. You will navigate and use basic features in both the Scene editor and Code editor.

More information

Using Formulas and Functions in Microsoft Excel

Using Formulas and Functions in Microsoft Excel Using Formulas and Functions in Microsoft Excel This document provides instructions for using basic formulas and functions in Microsoft Excel. Opening Comments Formulas are equations that perform calculations

More information

Data types Expressions Variables Assignment. COMP1400 Week 2

Data types Expressions Variables Assignment. COMP1400 Week 2 Data types Expressions Variables Assignment COMP1400 Week 2 Data types Data come in different types. The type of a piece of data describes: What the data means. What we can do with it. Primitive types

More information

Appendix A Reference: Built-in Methods

Appendix A Reference: Built-in Methods Appendix A Reference: Built-in Methods The Methods panel has three tabs so as to distinguish between procedural methods, functional methods, and methods related to that object's specific properties. Figure

More information

Kids College Computer Game Programming Exploring Alice 3.X and Object-Oriented Programming

Kids College Computer Game Programming Exploring Alice 3.X and Object-Oriented Programming Kids College Computer Game Programming Exploring Alice 3.X and Object-Oriented Programming Alice is a programming language developed by Carnegie Mellon that makes it easy to write objectbased, event driven,

More information

Creating and Triggering Animations

Creating and Triggering Animations Creating and Triggering Animations 1. Download the zip file containing BraidGraphics and unzip. 2. Create a new Unity project names TestAnimation and set the 2D option. 3. Create the following folders

More information

Using Functions in Alice

Using Functions in Alice Using Functions in Alice Step 1: Understanding Functions 1. Download the starting world that goes along with this tutorial. We will be using functions. A function in Alice is basically a question about

More information

The Alice Scene Editor

The Alice Scene Editor Facilitation Guide The Alice Scene Editor ( http://www.alice.org/resources/lessons/building-a-scene/ ) Summary This facilitation guide is intended to guide the instructor through the introduction of the

More information

Click the buttons in the interactive below to become familiar with the drawing tool's commands.

Click the buttons in the interactive below to become familiar with the drawing tool's commands. Google Documents Inserting Text Boxes and Shapes Introduction Page 1 Google Documents has a drawing tool designed for inserting text boxes and shapes into your document. Although not necessary for every

More information

Introduction to Electronics Workbench

Introduction to Electronics Workbench Introduction to Electronics Workbench Electronics Workbench (EWB) is a design tool that provides you with all the components and instruments to create board-level designs on your PC. The user interface

More information

Methods & Classes in Alice

Methods & Classes in Alice Part A Creating Custom Methods for an Object Alice provides primitive methods with each class to allow the programmer to accomplish some basic tasks such as movement. Some classes also include custom methods

More information

Alice. Coverage. Mathematical Expressions, Conditional Statements, Control Structures. Arithmetic Expressions Built-in Functions Conditional Execution

Alice. Coverage. Mathematical Expressions, Conditional Statements, Control Structures. Arithmetic Expressions Built-in Functions Conditional Execution Alice Mathematical Expressions, Conditional Statements, Control Structures Coverage Arithmetic Expressions Built-in Functions Conditional Execution If/Then Statements Control Structures Loops 1 Functions

More information

Introduction to Excel 2013

Introduction to Excel 2013 Introduction to Excel 2013 Copyright 2014, Software Application Training, West Chester University. A member of the Pennsylvania State Systems of Higher Education. No portion of this document may be reproduced

More information

Name Introduction to Computer Science. 1. A sequence of instructions that tell the computer what to do is known as a?

Name Introduction to Computer Science. 1. A sequence of instructions that tell the computer what to do is known as a? Name Introduction to Computer Science 1. A sequence of instructions that tell the computer what to do is known as a? a. help screen b. mouse click c. computer program d. keystroke 2. Actions to be performed

More information

SELECTION. (Chapter 2)

SELECTION. (Chapter 2) SELECTION (Chapter 2) Selection Very often you will want your programs to make choices among different groups of instructions For example, a program processing requests for airline tickets could have the

More information

Making Objects Move in Unison: Using Lists. Overview

Making Objects Move in Unison: Using Lists. Overview Making Objects Move in Unison: Using Lists By Deborah Nelson Duke University Professor Susan Rodger July 13, 2008 Updated June 2014 by Yossra Hamid Edited for Alice 3 use by Anh Trinh July 2016 Overview

More information

Making Objects Move in Unison: Using Lists

Making Objects Move in Unison: Using Lists Making Objects Move in Unison: Using Lists By Deborah Nelson Duke University Professor Susan Rodger July 13, 2008 Updated June 2014 by Yossra Hamid Edited for Alice 3 use by Anh Trinh July 2016 Overview

More information

Python Games. Session 1 By Declan Fox

Python Games. Session 1 By Declan Fox Python Games Session 1 By Declan Fox Rules General Information Wi-Fi Name: CoderDojo Password: coderdojowireless Website: http://cdathenry.wordpress.com/ Plans for this year Command line interface at first

More information

Table of Contents. 1. Creating a Microsoft Excel Workbook...1 EVALUATION COPY

Table of Contents. 1. Creating a Microsoft Excel Workbook...1 EVALUATION COPY Table of Contents Table of Contents 1. Creating a Microsoft Excel Workbook...1 Starting Microsoft Excel...1 Creating a Workbook...2 Saving a Workbook...3 The Status Bar...5 Adding and Deleting Worksheets...6

More information

Nonvisual Arrays and Recursion. by Chris Brown under Prof. Susan Rodger Duke University June 2012

Nonvisual Arrays and Recursion. by Chris Brown under Prof. Susan Rodger Duke University June 2012 Nonvisual Arrays and Recursion by Chris Brown under Prof. Susan Rodger Duke University June 2012 Nonvisual Arrays This tutorial will display how to create and use nonvisual arrays in Alice. Nonvisual arrays

More information

Chapter 2 Visual Basic Interface

Chapter 2 Visual Basic Interface Visual Basic Interface Slide 1 Windows GUI A GUI is a graphical user interface. The interface is what appears on the screen when an application is running. A GUI is event-driven, which means it executes

More information

1/16/12. CS 112 Introduction to Programming. A Foundation for Programming. (Spring 2012) Lecture #4: Built-in Types of Data. The Computer s View

1/16/12. CS 112 Introduction to Programming. A Foundation for Programming. (Spring 2012) Lecture #4: Built-in Types of Data. The Computer s View 1/16/12 A Foundation for Programming CS 112 Introduction to Programming (Spring 2012) any program you might want to write Lecture #4: Built-in Types of Data objects Zhong Shao methods and classes graphics,

More information

SUM - This says to add together cells F28 through F35. Notice that it will show your result is

SUM - This says to add together cells F28 through F35. Notice that it will show your result is COUNTA - The COUNTA function will examine a set of cells and tell you how many cells are not empty. In this example, Excel analyzed 19 cells and found that only 18 were not empty. COUNTBLANK - The COUNTBLANK

More information

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

More information

ITP 342 Mobile App Dev. Code

ITP 342 Mobile App Dev. Code ITP 342 Mobile App Dev Code Comments Variables Arithmetic operators Format specifiers if - else Relational operators Logical operators Constants Outline 2 Comments For a single line comment, use // The

More information

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Basic Formulas Filling Data

More information

BEGINNING PROBLEM-SOLVING CONCEPTS FOR THE COMPUTER. Chapter 2

BEGINNING PROBLEM-SOLVING CONCEPTS FOR THE COMPUTER. Chapter 2 1 BEGINNING PROBLEM-SOLVING CONCEPTS FOR THE COMPUTER Chapter 2 2 3 Types of Problems that can be solved on computers : Computational problems involving some kind of mathematical processing Logical Problems

More information

Applied Systems Client Network SEMINAR HANDOUT. Document Setup in TAM Changing from Office 2003 to 2007, where ARE things now?

Applied Systems Client Network SEMINAR HANDOUT. Document Setup in TAM Changing from Office 2003 to 2007, where ARE things now? Applied Systems Client Network SEMINAR HANDOUT Document Setup in TAM Changing from Office 2003 to 2007, where ARE things now? Prepared for ASCnet Applied Systems Client Network 801 Douglas Avenue #205

More information

Changing Camera Views! Part 2: Simple Scene Change & Lighting Fixes

Changing Camera Views! Part 2: Simple Scene Change & Lighting Fixes Changing Camera Views! Part 2: Simple Scene Change & Lighting Fixes By Bella Onwumbiko under the direction of Professor Susan Rodger Duke University July 2013 Introduction! In this tutorial, we will set

More information

= 3 + (5*4) + (1/2)*(4/2)^2.

= 3 + (5*4) + (1/2)*(4/2)^2. Physics 100 Lab 1: Use of a Spreadsheet to Analyze Data by Kenneth Hahn and Michael Goggin In this lab you will learn how to enter data into a spreadsheet and to manipulate the data in meaningful ways.

More information

Operators. Java operators are classified into three categories:

Operators. Java operators are classified into three categories: Operators Operators are symbols that perform arithmetic and logical operations on operands and provide a meaningful result. Operands are data values (variables or constants) which are involved in operations.

More information

Setting up A Basic Scene in Unity

Setting up A Basic Scene in Unity Setting up A Basic Scene in Unity So begins the first of this series of tutorials aimed at helping you gain the basic understanding of skills needed in Unity to develop a 3D game. As this is a programming

More information

CS 112 Introduction to Programming

CS 112 Introduction to Programming CS 112 Introduction to Programming Java Primitive Data Types; Arithmetic Expressions Yang (Richard) Yang Computer Science Department Yale University 308A Watson, Phone: 432-6400 Email: yry@cs.yale.edu

More information

Admin. CS 112 Introduction to Programming. Recap: Java Static Methods. Recap: Decomposition Example. Recap: Static Method Example

Admin. CS 112 Introduction to Programming. Recap: Java Static Methods. Recap: Decomposition Example. Recap: Static Method Example Admin CS 112 Introduction to Programming q Programming assignment 2 to be posted tonight Java Primitive Data Types; Arithmetic Expressions Yang (Richard) Yang Computer Science Department Yale University

More information

CIS 110: Introduction to Computer Programming

CIS 110: Introduction to Computer Programming CIS 110: Introduction to Computer Programming Lecture 3 Express Yourself ( 2.1) 9/16/2011 CIS 110 (11fa) - University of Pennsylvania 1 Outline 1. Data representation and types 2. Expressions 9/16/2011

More information

CSE 115. Introduction to Computer Science I

CSE 115. Introduction to Computer Science I CSE 115 Introduction to Computer Science I Note about posted slides The slides we post will sometimes contain additional slides/content, beyond what was presented in any one lecture. We do this so the

More information

Introduction to Events

Introduction to Events Facilitation Guide Introduction to Events ( http://www.alice.org/resources/lessons/introduction-to-events/ ) Summary This guide is intended to guide the facilitator through the creation of events and using

More information

The Essentials of Alice (Bunny) By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008

The Essentials of Alice (Bunny) By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008 The Essentials of Alice (Bunny) By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008 This tutorial will teach you how to create a short animation in an Alice world. Follow

More information

Full file at

Full file at Java Programming, Fifth Edition 2-1 Chapter 2 Using Data within a Program At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional

More information

A variable is a name for a location in memory A variable must be declared

A variable is a name for a location in memory A variable must be declared Variables A variable is a name for a location in memory A variable must be declared, specifying the variable's name and the type of information that will be held in it data type variable name int total;

More information

12/15/2008. All about Game Maker. Integrated Development Environment for 2D games Global idea

12/15/2008. All about Game Maker. Integrated Development Environment for 2D games Global idea Game Design 2008 Lecture 09 All about Game Maker Which is required for last assignment Integrated Development Environment for 2D games Global idea Simple to use, using drag-and-drop Still considerable

More information

Make View: Check Code

Make View: Check Code Lesson 2 Make View: Check Code SUMMARY This lesson is an introduction to creating Check Code inside the Make View module of Epi Info. In this lesson, you will learn how to customize your survey by creating

More information

Outline. Review of Last Week II. Review of Last Week. Computer Memory. Review Variables and Memory. February 7, Data Types

Outline. Review of Last Week II. Review of Last Week. Computer Memory. Review Variables and Memory. February 7, Data Types Data Types Declarations and Initializations Larry Caretto Computer Science 16 Computing in Engineering and Science February 7, 25 Outline Review last week Meaning of data types Integer data types have

More information

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York CSc 10200! Introduction to Computing Lecture 2-3 Edgardo Molina Fall 2013 City College of New York 1 C++ for Engineers and Scientists Third Edition Chapter 2 Problem Solving Using C++ 2 Objectives In this

More information

Introduction to Computer Science with MakeCode for Minecraft

Introduction to Computer Science with MakeCode for Minecraft Introduction to Computer Science with MakeCode for Minecraft Lesson 4: Variables In this lesson, we ll explore the concept of a variable, an important way to store information and make your programs more

More information

EXCEL BASICS: MICROSOFT OFFICE 2007

EXCEL BASICS: MICROSOFT OFFICE 2007 EXCEL BASICS: MICROSOFT OFFICE 2007 GETTING STARTED PAGE 02 Prerequisites What You Will Learn USING MICROSOFT EXCEL PAGE 03 Opening Microsoft Excel Microsoft Excel Features Keyboard Review Pointer Shapes

More information

Not For Sale. Glossary

Not For Sale. Glossary Glossary Actor A sprite and the role it plays as it interacts with another sprite on the stage. Animated GIF A graphic made up of two or more frames, each of which is displayed as an automated sequence

More information

append() function, 66 appending, 65, 97, 296 applications (apps; programs), defined, 2, 296

append() function, 66 appending, 65, 97, 296 applications (apps; programs), defined, 2, 296 Index Note: Page numbers followed by f, n, or t indicate figures, notes, and tables, respectively. Symbols += (addition and assignment operator), 100, 187 + (addition operator), \ (backslash), 240 / (division

More information

SMARTBoard. Basic Directions. Part 1 Pages 1-12

SMARTBoard. Basic Directions. Part 1 Pages 1-12 SMARTBoard Basic Directions Part 1 Pages 1-12 1 Index Tool Bar... 4 Change Fonts and Color of Fonts. 5 Save, Save as, Cut, Copy and Paste.. 5 Setting a Default Font. 6 Insert Pictures 3 Ways 7 Picture

More information

Unit 12. Electronic Spreadsheets - Microsoft Excel. Desired Outcomes

Unit 12. Electronic Spreadsheets - Microsoft Excel. Desired Outcomes Unit 12 Electronic Spreadsheets - Microsoft Excel Desired Outcomes Student understands Excel workbooks and worksheets Student can navigate in an Excel workbook and worksheet Student can use toolbars and

More information

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics Java Programming, Sixth Edition 2-1 Chapter 2 Using Data At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional Projects Additional

More information

CSE 1001 Fundamentals of Software Development 1. Identifiers, Variables, and Data Types Dr. H. Crawford Fall 2018

CSE 1001 Fundamentals of Software Development 1. Identifiers, Variables, and Data Types Dr. H. Crawford Fall 2018 CSE 1001 Fundamentals of Software Development 1 Identifiers, Variables, and Data Types Dr. H. Crawford Fall 2018 Identifiers, Variables and Data Types Reserved Words Identifiers in C Variables and Values

More information

Animating Objects in Groups: Using Arrays and Lists

Animating Objects in Groups: Using Arrays and Lists Animating Objects in Groups: Using and By Ruthie Tucker under the direction of Professor Susan Rodger Summer 2008 Description This tutorial will cover the basics of using arrays and lists in an Alice world.

More information

Microsoft Excel 2010 Handout

Microsoft Excel 2010 Handout Microsoft Excel 2010 Handout Excel is an electronic spreadsheet program you can use to enter and organize data, and perform a wide variety of number crunching tasks. Excel helps you organize and track

More information

Animating Objects in Groups: Using Arrays and Lists. By Ruthie Tucker under the direction of Professor Susan Rodger Summer 2008

Animating Objects in Groups: Using Arrays and Lists. By Ruthie Tucker under the direction of Professor Susan Rodger Summer 2008 Animating Objects in Groups: Using Arrays and Lists By Ruthie Tucker under the direction of Professor Susan Rodger Summer 2008 Description This tutorial will cover the basics of using arrays and lists

More information

Week 3: Objects, Input and Processing

Week 3: Objects, Input and Processing CS 170 Java Programming 1 Week 3: Objects, Input and Processing Learning to Create Objects Learning to Accept Input Learning to Process Data What s the Plan? Topic I: Working with Java Objects Learning

More information

Chapter 2: Data and Expressions

Chapter 2: Data and Expressions Chapter 2: Data and Expressions CS 121 Department of Computer Science College of Engineering Boise State University January 15, 2015 Chapter 2: Data and Expressions CS 121 1 / 1 Chapter 2 Part 1: Data

More information

VirMuF Manual V 0.5 1

VirMuF Manual V 0.5 1 VirMuF Manual V 0.5 1 Contents Overview... 3 How it Works... 3 Installation... 3 Usage... 4 Navigation... 4 Inspection... 5 Information... 6 Measure... 6 Cross Section... 7 Light... 8 Related Web Links...

More information

SPARK-PL: Introduction

SPARK-PL: Introduction Alexey Solovyev Abstract All basic elements of SPARK-PL are introduced. Table of Contents 1. Introduction to SPARK-PL... 1 2. Alphabet of SPARK-PL... 3 3. Types and variables... 3 4. SPARK-PL basic commands...

More information

What did we talk about last time? Examples switch statements

What did we talk about last time? Examples switch statements Week 4 - Friday What did we talk about last time? Examples switch statements History of computers Hardware Software development Basic Java syntax Output with System.out.print() Mechanical Calculation

More information

Excel 2016 Basics for Windows

Excel 2016 Basics for Windows Excel 2016 Basics for Windows Excel 2016 Basics for Windows Training Objective To learn the tools and features to get started using Excel 2016 more efficiently and effectively. What you can expect to learn

More information

1 Getting started with Processing

1 Getting started with Processing cisc3665, fall 2011, lab I.1 / prof sklar. 1 Getting started with Processing Processing is a sketch programming tool designed for use by non-technical people (e.g., artists, designers, musicians). For

More information

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals

More information

CS11 Java. Fall Lecture 1

CS11 Java. Fall Lecture 1 CS11 Java Fall 2006-2007 Lecture 1 Welcome! 8 Lectures Slides posted on CS11 website http://www.cs.caltech.edu/courses/cs11 7-8 Lab Assignments Made available on Mondays Due one week later Monday, 12 noon

More information

WeDo Mars Rover. YOUR CHALLENGE: Working with a partner, collect rock and soil samples from the Martian crust using your Mars Rover Robot.

WeDo Mars Rover. YOUR CHALLENGE: Working with a partner, collect rock and soil samples from the Martian crust using your Mars Rover Robot. WeDo Mars Rover WHAT: The Lego WeDo is a robotics kit that contains a motor, sensors, and a variety of Lego parts that can construct robots and kinetic sculptures. Program your WeDo creation using the

More information

Use the Move tool to drag A around and see how the automatically constructed objects (like G or the perpendicular and parallel lines) are updated.

Use the Move tool to drag A around and see how the automatically constructed objects (like G or the perpendicular and parallel lines) are updated. Math 5335 Fall 2015 Lab #0: Installing and using GeoGebra This semester you will have a number of lab assignments which require you to use GeoGebra, a dynamic geometry program. GeoGebra lets you explore

More information

Lecture 9. Assignment. Logical Operations. Logical Operations - Motivation 2/8/18

Lecture 9. Assignment. Logical Operations. Logical Operations - Motivation 2/8/18 Assignment Lecture 9 Logical Operations Formatted Print Printf Increment and decrement Read through 3.9, 3.10 Read 4.1. 4.2, 4.3 Go through checkpoint exercise 4.1 Logical Operations - Motivation Logical

More information

Gloucester County Library System. Excel 2010

Gloucester County Library System. Excel 2010 Gloucester County Library System Excel 2010 Introduction What is Excel? Microsoft Excel is an electronic spreadsheet program. It is capable of performing many different types of calculations and can organize

More information

GAZIANTEP UNIVERSITY INFORMATICS SECTION SEMETER

GAZIANTEP UNIVERSITY INFORMATICS SECTION SEMETER GAZIANTEP UNIVERSITY INFORMATICS SECTION 2010-2011-2 SEMETER Microsoft Excel is located in the Microsoft Office paket. in brief Excel is spreadsheet, accounting and graphics program. WHAT CAN WE DO WITH

More information

ECE 122 Engineering Problem Solving with Java

ECE 122 Engineering Problem Solving with Java ECE 122 Engineering Problem Solving with Java Lecture 3 Expression Evaluation and Program Interaction Outline Problem: How do I input data and use it in complicated expressions Creating complicated expressions

More information

Microsoft Robotics Studio Walk-through

Microsoft Robotics Studio Walk-through Microsoft Robotics Studio Walk-through Installation requisites This guide has been developed with Microsoft Robotics Studio (MSRS) 1.5 Refresh. Everything is license-free and can be downloaded from the

More information

Skater World: Part Three

Skater World: Part Three Skater World: Part Three By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 2009 1 Overview The story continues: We will change the camera view during animation. Also,

More information

Objectives. Chapter 4: Control Structures I (Selection) Objectives (cont d.) Control Structures. Control Structures (cont d.) Relational Operators

Objectives. Chapter 4: Control Structures I (Selection) Objectives (cont d.) Control Structures. Control Structures (cont d.) Relational Operators Objectives Chapter 4: Control Structures I (Selection) In this chapter, you will: Learn about control structures Examine relational and logical operators Explore how to form and evaluate logical (Boolean)

More information

The Mathcad Workspace 7

The Mathcad Workspace 7 For information on system requirements and how to install Mathcad on your computer, refer to Chapter 1, Welcome to Mathcad. When you start Mathcad, you ll see a window like that shown in Figure 2-1. By

More information

Introduction to TURING

Introduction to TURING Introduction to TURING Comments Some code is difficult to understand, even if you understand the language it is written in. To that end, the designers of programming languages have allowed us to comment

More information

Visual Basic 2008 The programming part

Visual Basic 2008 The programming part Visual Basic 2008 The programming part Code Computer applications are built by giving instructions to the computer. In programming, the instructions are called statements, and all of the statements that

More information

Page 1 of 8 Tutorial Modeling a Bishop In this lesson you will model a bishop for the chess set. As with the rook, the base of the bishop has already been created. You will add the miter on top of the

More information

Fundamentals. Fundamentals. Fundamentals. We build up instructions from three types of materials

Fundamentals. Fundamentals. Fundamentals. We build up instructions from three types of materials Fundamentals We build up instructions from three types of materials Constants Expressions Fundamentals Constants are just that, they are values that don t change as our macros are executing Fundamentals

More information

animation, and what interface elements the Flash editor contains to help you create and control your animation.

animation, and what interface elements the Flash editor contains to help you create and control your animation. e r ch02.fm Page 43 Wednesday, November 15, 2000 8:52 AM c h a p t 2 Animating the Page IN THIS CHAPTER Timelines and Frames Movement Tweening Shape Tweening Fading Recap Advanced Projects You have totally

More information

Functions in Excel. Structure of a function: Basic Mathematical Functions. Arithmetic operators: Comparison Operators:

Functions in Excel. Structure of a function: Basic Mathematical Functions. Arithmetic operators: Comparison Operators: Page1 Functions in Excel Formulas (functions) are equations that perform calculations on values in your spreadsheet. A formula always starts with an equal sign (=). Example: =5+2*7 This formula multiples

More information

CS112 Lecture: Working with Numbers

CS112 Lecture: Working with Numbers CS112 Lecture: Working with Numbers Last revised January 30, 2008 Objectives: 1. To introduce arithmetic operators and expressions 2. To expand on accessor methods 3. To expand on variables, declarations

More information

Tutorial00. Jumping down the rabbit hole

Tutorial00. Jumping down the rabbit hole Tutorial00 Jumping down the rabbit hole This is your quick introduction into the world of ALICE. ALICE program provides us with an interface that allows the user to create 3D animation and write computer

More information

Adding A Signature To A Photograph By Jerry Koons

Adding A Signature To A Photograph By Jerry Koons The addition of a signature can help identify the image owner, which can be desirable for certain uses such as Field Trip shows. This procedure presents a step-by-step method to create a signature and

More information

Algorithms and Programming I. Lecture#12 Spring 2015

Algorithms and Programming I. Lecture#12 Spring 2015 Algorithms and Programming I Lecture#12 Spring 2015 Think Python How to Think Like a Computer Scientist By :Allen Downey Installing Python Follow the instructions on installing Python and IDLE on your

More information