LSP 121. LSP 121 Math and Tech Literacy II. Topics. Loops. Loops. Loops

Size: px
Start display at page:

Download "LSP 121. LSP 121 Math and Tech Literacy II. Topics. Loops. Loops. Loops"

Transcription

1 LSP 121 Math and Tech Literacy II Greg Brewster DePaul University Topics The FOR loop Repeats a set of statements a fixed number of times The WHILE loop Repeats a set of statements until a condition is false Strategies for Writing VB Programs Write pseudo code first, then translate to VB statements, then test How to continue after Excel error messages Commenting out statements while testing Adding MsgBox statements to check variable or cell values while testing provide a way to repeatedly execute VB statements in a subroutine (subroutine = macro). We will look at 2 types of FOR loops Repeat a set of statements a fixed number of times. DO WHILE loops Repeat a set of statements until a condition becomes false. Greg Brewster, DePaul University Page 1

2 The FOR Loop A basic FOR loop looks like this: FOR <loop-var> = 1 to <number> <statement1> <statement2> NEXT <loop-var> This causes the <statements> between FOR and NEXT to be repeated <number> times. <number> can be a constant value or a variable. The <loop-var> is a variable whose value will be equal to 1 on first loop repetition, 2 on 2 nd repetition, 3 on 3 rd repetition, etc. FOR loop example Here is a subroutine that pops up 10 MsgBox windows displaying values 1 through 10 Sub Show_Loop() FOR my_loop = 1 to 10 MsgBox Loop variable is & my_loop NEXT my_loop End Sub FOR loop example Here is a subroutine that adds together 20 die rolls and displays the total. Sub Add_Rolls() roll_total = 0 FOR roll_loop = 1 to 20 die1 = roll_die() roll_total = roll_total + die1 NEXT roll_loop MsgBox Sum of 20 die rolls is & roll_total End Sub Greg Brewster, DePaul University Page 2

3 The DO WHILE Loop The DO WHILE loop keeps executing statements while a condition is true. DO WHILE <condition> <statement1> <statement2> LOOP If <condition> is true, then <statements> are executed. If <condition> is still true, then <statements> are executed again. Repeat until <condition> is false DO WHILE loop example Here is a subroutine that pops up 10 MsgBox windows displaying values 1 through 10 Sub Show_Loop2() my_var = 0 DO WHILE (my_var < 10) my_var = my_var + 1 MsgBox Value is & my_var LOOP End Sub DO WHILE loop example This subroutine that keeps asking user to enter a value until he/she types a value between 1 and 6. Sub Input_Loop() my_var = InputBox(prompt:= Enter value from 1 to 6 ) DO WHILE ((my_var < 1) OR (my_var > 6)) MsgBox That value was not between 1 and 6. my_var = InputBox(prompt:= Enter value from 1 to 6 ) LOOP MsgBox The value you entered was: & my_var End Sub Greg Brewster, DePaul University Page 3

4 Using Cells(x,y) There are 2 ways to refer to an Excel worksheet cell within a VB subroutine. VB uses the Range keyword to refer to cells in the traditional Excel way, with a letter for the column and number for the row (like cell C5, cell D8, etc.) Range( C5 ).Value refers to value in cell C5. You can also refer to a cell by its row number and column number, using the Cells keyword, where Cells(x,y) refers to the cell in row x, column y. Cells(5, 3).Value also refers to value in cell C5 (which is in 5 th row, 3 rd column). Range names for cells Cells(x,y) names for cells Greg Brewster, DePaul University Page 4

5 Greg Brewster, DePaul University Page 5 and Cells(x,y) Combining and the Cells(x,y) naming we can create useful macros for setting values of many cells in the worksheet. and Cells(x,y) Combining and the Cells(x,y) naming we can create useful macros for setting values of many cells in the worksheet. Example: Numbering Rows This VB subroutine puts row numbers in the left column of multiple rows. Sub number_rows() Num_rows = InputBox(prompt:= How many rows? ) For loop_var = 1 to Num_rows Cells(loop_var, 1).Value = loop_var Next loop_var End sub

6 Example: Multiplication Table This VB subroutine displays a square multiplication table (nested for loops). Sub mult_table() Num_rows = InputBox(prompt:= How many rows/cols? ) For var1 = 1 to Num_rows For var2 = 1 to Num_rows Cells(var1, var2).value = var1 * var2 Next var2 Next var1 End sub Strategies for VB Strategies for Writing VB Programs Write pseudo code first, then translate to VB statements, then test How to continue after Excel error messages Commenting out statements while testing Adding MsgBox statements to check variable or cell values while testing Strategies for VB Don t just start typing in the Visual Basic Editor. Write your entire program out first in English psuedo code. Decide how many subroutines you will write and what each one will do. Each pseudo code statement should do one simple operation, like move a data value, input a value, perform a calculation, display a value. Pseudo code statements can then be grouped into sets of statements in IF or Loop constructs Greg Brewster, DePaul University Page 6

7 Strategies for VB After all details of each pseudo code statement in each subroutine are written down on paper, then start typing Visual Basic statements in the Visual Basic Editor. Type the Sub name() line first. VB will add the End Sub in for you. Then, as you type in each VB statement, test it to make sure it works before you go on to type the next one. Strategies for VB As you type in Visual Basic statements, make sure that they match exactly with the way they looked in the PPT examples. In the PPT slides, capitalized words should be included unchanged, while words in brackets ( < > ) should be taken out and replaced by your own choice. For example: FOR <var> = 1 TO <num> in the PPT slides means you must type FOR, then you put in your own variable name for <var>, then you must type = 1 TO, and then you put in your own number for <num>. Strategies for VB As you type in Visual Basic IF and Loop constructs, it is helpful to indent the statements inside these constructs to make it clear where the IF or Loop begins and ends. But this is not required. Greg Brewster, DePaul University Page 7

8 Testing VB Statements How do you test individual VB statements? First, make sure that there are no formatting errors in your statement. If your statement has format errors, the VBE will show statement in Red. Go back to PPT slide examples of the same statement to make sure that you have all punctuation marks, parentheses, etc. exactly the same as the example. VB may try to show you the first character where the error occurs. Try to see what this should be changed to make it right. Then, run the macro to see whether that one statement works correctly. You can usually add a MsgBox statement to display results and see whether statements executed correctly. Then comment out the MsgBox after you are done testing. Testing VB Statements As you are testing statements, you can comment out other statements by putting a single-quote ( ) at the beginning of all statements that you do not want to be executed. Remember, the single-quote at the start of a statement causes VB to ignore that statement because it believes it is a comment for humans only. When you want the statement to execute again, simply remove the single-quote at the start of the statement and it will execute again. You can use commenting out to separately test different parts of your subroutines without re-typing. Excel VB Errors When Excel finds problems, it pops up an Error Box with an error statement and highlights the statement that caused the problem. Sometimes the error box message may help you to find the problem. Other times it won t. But focus on the place the error occurred. After the error occurs, if your Subroutine name is highlighted in Yellow, then VB is in Debug Mode and you need to press F5 key (or Run->Continue) after fixing the error to continue execution. If you are really stuck on an error, then send me a copy of your subroutine in and I ll help. Greg Brewster, DePaul University Page 8

9 Adding MsgBox statements Adding extra MsgBox statements to your subroutine is a great way to verify the values of variables in the middle of execution and see that everything is working right. Once you are sure that everything is correct, you can remove the MsgBox Adding MsgBox statements Adding extra MsgBox statements to your subroutine is a great way to verify the values of variables in the middle of execution and see that everything is working right. Once you are sure that everything is correct, you can remove the MsgBox Excel 2003? If you do not have Excel 2007 available on your personal computer, you can still do VB programming using Excel The Record Macro, Macros and Visual Basic options are under the Tools menu in Excel 2003 rather than the Developer ribbon. Otherwise, everything works pretty much the same. Greg Brewster, DePaul University Page 9

10 Greg Brewster, DePaul University Page 10 In-Class Example Let s work through the pseudo code and VB statements for the following example: Create a subroutine to be assigned to the button shown on the next page so that clicking the Flip Coin button shows a new coin toss (H or T) and keeps track of how many heads and tails have been tossed so far. In-Class Example Heads so Far Coin Toss H Tails so Far 0 0

LSP 121. LSP 121 Math and Tech Literacy II. Topics. More VBA. More VBA. Variables

LSP 121. LSP 121 Math and Tech Literacy II. Topics. More VBA. More VBA. Variables Greg Brewster, DePaul University Page 1 Math and Tech Literacy II Greg Brewster DePaul University Topics More Visual Basic Variables Naming Rules Implicit vs. Explicit Types Variable Lifetime Static variables

More information

DOWNLOAD PDF MICROSOFT EXCEL ALL FORMULAS LIST WITH EXAMPLES

DOWNLOAD PDF MICROSOFT EXCEL ALL FORMULAS LIST WITH EXAMPLES Chapter 1 : Examples of commonly used formulas - Office Support A collection of useful Excel formulas for sums and counts, dates and times, text manipularion, conditional formatting, percentages, Excel

More information

SAMLab Tip Sheet #1 Translating Mathematical Formulas Into Excel s Language

SAMLab Tip Sheet #1 Translating Mathematical Formulas Into Excel s Language Translating Mathematical Formulas Into Excel s Language Introduction Microsoft Excel is a very powerful calculator; you can use it to compute a wide variety of mathematical expressions. Before exploring

More information

DOWNLOAD PDF EXCEL MACRO TO PRINT WORKSHEET TO

DOWNLOAD PDF EXCEL MACRO TO PRINT WORKSHEET TO Chapter 1 : All about printing sheets, workbook, charts etc. from Excel VBA - blog.quintoapp.com Hello Friends, Hope you are doing well!! Thought of sharing a small VBA code to help you writing a code

More information

Excel Basics Fall 2016

Excel Basics Fall 2016 If you have never worked with Excel, it can be a little confusing at first. When you open Excel, you are faced with various toolbars and menus and a big, empty grid. So what do you do with it? The great

More information

VBA Handout. References, tutorials, books. Code basics. Conditional statements. Dim myvar As <Type >

VBA Handout. References, tutorials, books. Code basics. Conditional statements. Dim myvar As <Type > VBA Handout References, tutorials, books Excel and VBA tutorials Excel VBA Made Easy (Book) Excel 2013 Power Programming with VBA (online library reference) VBA for Modelers (Book on Amazon) Code basics

More information

Outline. Midterm Review. Using Excel. Midterm Review: Excel Basics. Using VBA. Sample Exam Question. Midterm Review April 4, 2014

Outline. Midterm Review. Using Excel. Midterm Review: Excel Basics. Using VBA. Sample Exam Question. Midterm Review April 4, 2014 Midterm Review Larry Caretto Mechanical Engineering 209 Computer Programming for Mechanical Engineers April 4, 2017 Outline Excel spreadsheet basics Use of VBA functions and subs Declaring/using variables

More information

Civil Engineering Computation

Civil Engineering Computation Civil Engineering Computation First Steps in VBA Homework Evaluation 2 1 Homework Evaluation 3 Based on this rubric, you may resubmit Homework 1 and Homework 2 (along with today s homework) by next Monday

More information

Extending the Unit Converter

Extending the Unit Converter Extending the Unit Converter You wrote a unit converter previously that converted the values in selected cells from degrees Celsius to degrees Fahrenheit. You could write separate macros to do different

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

VBA Excel 2013/2016. VBA Visual Basic for Applications. Learner Guide

VBA Excel 2013/2016. VBA Visual Basic for Applications. Learner Guide VBA Visual Basic for Applications Learner Guide 1 Table of Contents SECTION 1 WORKING WITH MACROS...5 WORKING WITH MACROS...6 About Excel macros...6 Opening Excel (using Windows 7 or 10)...6 Recognizing

More information

TI-84+ GC 3: Order of Operations, Additional Parentheses, Roots and Absolute Value

TI-84+ GC 3: Order of Operations, Additional Parentheses, Roots and Absolute Value Rev 6--11 Name Date TI-84+ GC : Order of Operations, Additional Parentheses, Roots and Absolute Value Objectives: Review the order of operations Observe that the GC uses the order of operations Use parentheses

More information

Excel & Business Math Video/Class Project #28 IF Function, ISBLANK function and Building a Check Register

Excel & Business Math Video/Class Project #28 IF Function, ISBLANK function and Building a Check Register Topics Excel & Business Math Video/Class Project #28 IF Function, ISBLANK function and Building a Check Register 1) Format Check Register with Borders as seen in this video... 2 2) Data Validation for

More information

This chapter is intended to take you through the basic steps of using the Visual Basic

This chapter is intended to take you through the basic steps of using the Visual Basic CHAPTER 1 The Basics This chapter is intended to take you through the basic steps of using the Visual Basic Editor window and writing a simple piece of VBA code. It will show you how to use the Visual

More information

Excel VBA. Microsoft Excel is an extremely powerful tool that you can use to manipulate, analyze, and present data.

Excel VBA. Microsoft Excel is an extremely powerful tool that you can use to manipulate, analyze, and present data. Excel VBA WHAT IS VBA AND WHY WE USE IT Microsoft Excel is an extremely powerful tool that you can use to manipulate, analyze, and present data. Sometimes though, despite the rich set of features in the

More information

VBA Collections A Group of Similar Objects that Share Common Properties, Methods and

VBA Collections A Group of Similar Objects that Share Common Properties, Methods and VBA AND MACROS VBA is a major division of the stand-alone Visual Basic programming language. It is integrated into Microsoft Office applications. It is the macro language of Microsoft Office Suite. Previously

More information

You can record macros to automate tedious

You can record macros to automate tedious Introduction to Macros You can record macros to automate tedious and repetitive tasks in Excel without writing programming code directly. Macros are efficiency tools that enable you to perform repetitive

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

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

Excel Intermediate

Excel Intermediate Excel 2013 - Intermediate (103-124) Multiple Worksheets Quick Links Manipulating Sheets Pages EX16 EX17 Copying Worksheets Page EX337 Grouping Worksheets Pages EX330 EX332 Multi-Sheet Cell References Page

More information

LSP 121. LSP 121 Math and Tech Literacy II. Topics. Quartiles. Intro to Statistics. More Descriptive Statistics

LSP 121. LSP 121 Math and Tech Literacy II. Topics. Quartiles. Intro to Statistics. More Descriptive Statistics Greg Brewster, DePaul University Page 1 LSP 121 Math and Tech Literacy II More Descriptive Statistics Greg Brewster DePaul University Topics More Descriptive Statistics Quartiles Percentiles Categorical

More information

Not For Sale. Using and Writing Visual Basic for Applications Code. Creating VBA Code for the Holland Database. Case Belmont Landscapes

Not For Sale. Using and Writing Visual Basic for Applications Code. Creating VBA Code for the Holland Database. Case Belmont Landscapes Objectives Tutorial 11 Session 11.1 Learn about Function procedures (functions), Sub procedures (subroutines), and modules Review and modify an existing subroutine in an event procedure Create a function

More information

Excel 2010 Functions. 4/18/2011 Archdiocese of Chicago Mike Riley

Excel 2010 Functions. 4/18/2011 Archdiocese of Chicago Mike Riley Excel 2010 Functions 4/18/2011 Archdiocese of Chicago Mike Riley i VIDEO TUTORIALS AVAILABLE Almost 100,000 video tutorials are available from VTC. The available tutorials include Windows 7, GroupWise

More information

Excel Lesson 3 USING FORMULAS & FUNCTIONS

Excel Lesson 3 USING FORMULAS & FUNCTIONS Excel Lesson 3 USING FORMULAS & FUNCTIONS 1 OBJECTIVES Enter formulas in a worksheet Understand cell references Copy formulas Use functions Review and edit formulas 2 INTRODUCTION The value of a spreadsheet

More information

COPYRIGHTED MATERIAL PART I. LESSON 1: Introducing VBA. LESSON 2: Getting Started with Macros. LESSON 3: Introducing the Visual Basic Editor

COPYRIGHTED MATERIAL PART I. LESSON 1: Introducing VBA. LESSON 2: Getting Started with Macros. LESSON 3: Introducing the Visual Basic Editor PART I LESSON 1: Introducing VBA LESSON 2: Getting Started with Macros LESSON 3: Introducing the Visual Basic Editor LESSON 4: Working in the VBE COPYRIGHTED MATERIAL 1 Welcome to your first lesson in

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Introduction This handout briefly outlines most of the basic uses and functions of Excel that we will be using in this course. Although Excel may be used for performing statistical

More information

Structured Solutions Inc. Tools MS Project to Excel Export/Import Tools

Structured Solutions Inc. Tools MS Project to Excel Export/Import Tools Structured Solutions Inc. Tools MS Project to Excel Export/Import Tools This Macro Enabled Excel workbook contains a collection of useful tools that enables the user to Get, Post or Lookup data from MS

More information

Office 2016 Excel Basics 12 Video/Class Project #24 Excel Basics 12: Formula Types and Formula Elements

Office 2016 Excel Basics 12 Video/Class Project #24 Excel Basics 12: Formula Types and Formula Elements Office 2016 Excel Basics 12 Video/Class Project #24 Excel Basics 12: Formula Types and Formula Elements Goal in video # 12: Learn about the different types of formulas and learn about the different formula

More information

Jump Right In! Essential Computer Skills Using Microsoft 2013 By Andrews, Dark, and West

Jump Right In! Essential Computer Skills Using Microsoft 2013 By Andrews, Dark, and West Jump Right In! Essential Computer Skills Using Microsoft 2013 By Andrews, Dark, and West Chapter 10 Managing Numbers and Text Using Excel 1 Objectives Examine the Excel window and tools Enter and format

More information

QUICK EXCEL TUTORIAL. The Very Basics

QUICK EXCEL TUTORIAL. The Very Basics QUICK EXCEL TUTORIAL The Very Basics You Are Here. Titles & Column Headers Merging Cells Text Alignment When we work on spread sheets we often need to have a title and/or header clearly visible. Merge

More information

Basics: How to Calculate Standard Deviation in Excel

Basics: How to Calculate Standard Deviation in Excel Basics: How to Calculate Standard Deviation in Excel In this guide, we are going to look at the basics of calculating the standard deviation of a data set. The calculations will be done step by step, without

More information

Unit E Step-by-Step: Programming with Python

Unit E Step-by-Step: Programming with Python Unit E Step-by-Step: Programming with Python Computer Concepts 2016 ENHANCED EDITION 1 Unit Contents Section A: Hello World! Python Style Section B: The Wacky Word Game Section C: Build Your Own Calculator

More information

CS 200. Lecture 07. Excel Scripting. Miscellaneous Notes

CS 200. Lecture 07. Excel Scripting. Miscellaneous Notes CS 200 Lecture 07 1 Abbreviations aka Also Known As Miscellaneous Notes CWS Course Web Site (http://www.student.cs.uwaterloo.ca/~cs200) VBE Visual Basic Editor intra- a prefix meaning within thus intra-cellular

More information

Advanced Financial Modeling Macros. EduPristine

Advanced Financial Modeling Macros. EduPristine Advanced Financial Modeling Macros EduPristine www.edupristine.com/ca Agenda Introduction to Macros & Advanced Application Building in Excel Introduction and context Key Concepts in Macros Macros as recorded

More information

Excel Basic: Create Formulas

Excel Basic: Create Formulas Better Technology, Onsite and Personal Connecting NIOGA s Communities www.btopexpress.org www.nioga.org [Type Excel Basic: Create Formulas Overview: Let Excel do your math for you! After an introduction

More information

Create formulas in Excel

Create formulas in Excel Training Create formulas in Excel EXERCISE 1: TYPE SOME SIMPLE FORMULAS TO ADD, SUBTRACT, MULTIPLY, AND DIVIDE 1. Click in cell A1. First you ll add two numbers. 2. Type =534+382. 3. Press ENTER on your

More information

Function Call Stack and Activation Records

Function Call Stack and Activation Records 71 Function Call Stack and Activation Records To understand how C performs function calls, we first need to consider a data structure (i.e., collection of related data items) known as a stack. Students

More information

POWERONE TEMPLATES A DOCUMENT DESCRIBING HOW TO CREATE TEMPLATES.

POWERONE TEMPLATES A DOCUMENT DESCRIBING HOW TO CREATE TEMPLATES. I N F I N I T Y S O F T W O R K S POWERONE TEMPLATES A DOCUMENT DESCRIBING HOW TO CREATE TEMPLATES www.infinitysw.com/help/create Templates What is a template? powerone uses templates as its primary medium

More information

My Top 5 Formulas OutofhoursAdmin

My Top 5 Formulas OutofhoursAdmin CONTENTS INTRODUCTION... 2 MS OFFICE... 3 Which Version of Microsoft Office Do I Have?... 4 How To Customise Your Recent Files List... 5 How to recover an unsaved file in MS Office 2010... 7 TOP 5 FORMULAS...

More information

Coding Workshop. Learning to Program with an Arduino. Lecture Notes. Programming Introduction Values Assignment Arithmetic.

Coding Workshop. Learning to Program with an Arduino. Lecture Notes. Programming Introduction Values Assignment Arithmetic. Coding Workshop Learning to Program with an Arduino Lecture Notes Table of Contents Programming ntroduction Values Assignment Arithmetic Control Tests f Blocks For Blocks Functions Arduino Main Functions

More information

SYMMETRY v.1 (square)

SYMMETRY v.1 (square) Symmetry with Code - v1 George Gadanidis 2017 researchideas.ca/sym 1 SYMMETRY v.1 (square) What is symmetry? I can t remember. Help! SQUARE PUZZLE My teacher loves puzzles I do too! Here is the latest

More information

The first program: Little Crab

The first program: Little Crab Chapter 2 The first program: Little Crab topics: concepts: writing code: movement, turning, reacting to the screen edges source code, method call, parameter, sequence, if-statement In the previous chapter,

More information

CS 200. Lecture 07. Excel Scripting. Excel Scripting. CS 200 Fall 2016

CS 200. Lecture 07. Excel Scripting. Excel Scripting. CS 200 Fall 2016 CS 200 Lecture 07 1 Abbreviations aka Also Known As Miscellaneous Notes CWS Course Web Site (http://www.student.cs.uwaterloo.ca/~cs200) VBE Visual Basic Editor intra- a prefix meaning within thus intra-cellular

More information

CS 200. Lecture 07. Excel Scripting. Miscellaneous Notes

CS 200. Lecture 07. Excel Scripting. Miscellaneous Notes CS 200 Lecture 07 1 Abbreviations aka Also Known As Miscellaneous Notes CWS Course Web Site (http://www.student.cs.uwaterloo.ca/~cs200) VBE Visual Basic Editor intra- a prefix meaning within thus intra-cellular

More information

CS 200. Lecture 05. Excel Scripting. Excel Scripting. CS 200 Fall 2014

CS 200. Lecture 05. Excel Scripting. Excel Scripting. CS 200 Fall 2014 CS 200 Lecture 05 1 Abbreviations aka CWS VBE intra- inter- Also Known As Miscellaneous Notes Course Web Site (http://www.student.cs.uwaterloo.ca/~cs200) Visual Basic Editor a prefix meaning within thus

More information

INTERNATIONAL HEALTH INSURANCE

INTERNATIONAL HEALTH INSURANCE Policy and Procedure Overview INTERNATIONAL HEALTH INSURANCE 1. You will first generate a list of all UConn employees requesting International Health Insurance for their business travel. o This is done

More information

EXCEL BASICS: MICROSOFT OFFICE 2010

EXCEL BASICS: MICROSOFT OFFICE 2010 EXCEL BASICS: MICROSOFT OFFICE 2010 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

MITOCW watch?v=0jljzrnhwoi

MITOCW watch?v=0jljzrnhwoi MITOCW watch?v=0jljzrnhwoi The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

C++ Reference NYU Digital Electronics Lab Fall 2016

C++ Reference NYU Digital Electronics Lab Fall 2016 C++ Reference NYU Digital Electronics Lab Fall 2016 Updated on August 24, 2016 This document outlines important information about the C++ programming language as it relates to NYU s Digital Electronics

More information

COMP : Practical 8 ActionScript II: The If statement and Variables

COMP : Practical 8 ActionScript II: The If statement and Variables COMP126-2006: Practical 8 ActionScript II: The If statement and Variables The goal of this practical is to introduce the ActionScript if statement and variables. If statements allow us to write scripts

More information

Most of the class will focus on if/else statements and the logical statements ("conditionals") that are used to build them. Then I'll go over a few

Most of the class will focus on if/else statements and the logical statements (conditionals) that are used to build them. Then I'll go over a few With notes! 1 Most of the class will focus on if/else statements and the logical statements ("conditionals") that are used to build them. Then I'll go over a few useful functions (some built into standard

More information

Microsoft Excel 2010 Training. Excel 2010 Basics

Microsoft Excel 2010 Training. Excel 2010 Basics Microsoft Excel 2010 Training Excel 2010 Basics Overview Excel is a spreadsheet, a grid made from columns and rows. It is a software program that can make number manipulation easy and somewhat painless.

More information

Excel Format cells Number Percentage (.20 not 20) Special (Zip, Phone) Font

Excel Format cells Number Percentage (.20 not 20) Special (Zip, Phone) Font Excel 2013 Shortcuts My favorites: Ctrl+C copy (C=Copy) Ctrl+X cut (x is the shape of scissors) Ctrl+V paste (v is the shape of the tip of a glue bottle) Ctrl+A - or the corner of worksheet Ctrl+Home Goes

More information

Mastering Excel Macros Book 11 Function Procedures. Mark Moore

Mastering Excel Macros Book 11 Function Procedures. Mark Moore Mastering Excel Macros Book 11 Function Procedures Mark Moore Copyright 2016 by Mark Moore. All rights reserved worldwide. No part of this publication may be replicated, redistributed, or given away in

More information

Procedures: Algorithms and Abstraction

Procedures: Algorithms and Abstraction Procedures: Algorithms and Abstraction 5 5.1 Objectives After completing this module, a student should be able to: Read and understand simple NetLogo models. Make changes to NetLogo procedures and predict

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

Chapter-2 Digital Data Analysis

Chapter-2 Digital Data Analysis Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting Microsoft Word and Excel files is a simple matter. There are a couple of

More information

Access Intermediate

Access Intermediate Access 2013 - Intermediate 103-134 Advanced Queries Quick Links Overview Pages AC124 AC125 Selecting Fields Pages AC125 AC128 AC129 AC131 AC238 Sorting Results Pages AC131 AC136 Specifying Criteria Pages

More information

Functions, Randomness and Libraries

Functions, Randomness and Libraries Functions, Randomness and Libraries 1 Predefined Functions recall: in mathematics, a function is a mapping from inputs to a single output e.g., the absolute value function: -5 5, 17.3 17.3 in JavaScript,

More information

Data 8 Final Review #1

Data 8 Final Review #1 Data 8 Final Review #1 Topics we ll cover: Visualizations Arrays and Table Manipulations Programming constructs (functions, for loops, conditional statements) Chance, Simulation, Sampling and Distributions

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

(f) d={ alchemist :( a, t ), shaman : ( s, n ), wizard : ( w, z )} d[ shaman ][1]

(f) d={ alchemist :( a, t ), shaman : ( s, n ), wizard : ( w, z )} d[ shaman ][1] CSCI1101 Final Exam December 18, 2018 Solutions 1. Determine the value and type of each of the expressions below. If the question has two lines, assume that the statement in the first line is executed,

More information

Microsoft Office Excel 2007: Basic Course 01 - Getting Started

Microsoft Office Excel 2007: Basic Course 01 - Getting Started Microsoft Office Excel 2007: Basic Course 01 - Getting Started Slide 1 Getting started Course objectives Identify spreadsheet components Identify the main components of Excel Use the Help feature Open

More information

Excel Intermediate

Excel Intermediate Excel 2013 - Intermediate (103-124) Advanced Functions Quick Links Range Names Pages EX394 EX407 Data Validation Pages EX410 EX419 VLOOKUP Pages EX176 EX179 EX489 EX500 IF Pages EX172 EX176 EX466 EX489

More information

4.2 Function definitions the basics

4.2 Function definitions the basics 4.2. FUNCTION DEFINITIONS THE BASICS 89 4.2 Function definitions the basics There are three questions you must answer before you can write a function definition: What will the function do? What inputs

More information

Mastering the Actuarial Tool Kit

Mastering the Actuarial Tool Kit Mastering the Actuarial Tool Kit By Sean Lorentz, ASA, MAAA Quick, what s your favorite Excel formula? Is it the tried and true old faithful SUMPRODUCT formula we ve all grown to love, or maybe once Microsoft

More information

Summer 2017 Discussion 10: July 25, Introduction. 2 Primitives and Define

Summer 2017 Discussion 10: July 25, Introduction. 2 Primitives and Define CS 6A Scheme Summer 207 Discussion 0: July 25, 207 Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme programs,

More information

Grade Point Scales Standard Honors AP/College A B C D F Sample file

Grade Point Scales Standard Honors AP/College A B C D F Sample file 64 Transcripts Weighted Cumulative GPA When your student works extra hard and takes honors or college courses, they deserve a little credit. The best way to reflect this is through their GPA. They deserve

More information

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 05 I/O statements Printf, Scanf Simple

More information

An introduction to programming in Visual Basic AGEC

An introduction to programming in Visual Basic AGEC This document was generated at 11:55 AM on Wednesday, March 01, 2017 An introduction to programming in Visual Basic AGEC 642-2017 I. Introduction The purpose of this tutorial is to provide you with the

More information

Tab-Delimited File and Compound Objects - Documents, Postcards, and Cubes. (Not Monographs)

Tab-Delimited File and Compound Objects - Documents, Postcards, and Cubes. (Not Monographs) 1" Tab-Delimited File and Compound Objects - Documents, Postcards, and Cubes (Not Monographs) See Help Sheet: Tab-Delimited File and Compound Object - Monograph Content "2" Page 4: Why use Tab-delimited

More information

CS 200. Lecture 07. Excel Scripting. Excel Scripting. CS 200 Spring Wednesday, June 18, 2014

CS 200. Lecture 07. Excel Scripting. Excel Scripting. CS 200 Spring Wednesday, June 18, 2014 CS 200 Lecture 07 1 Miscellaneous Notes Abbreviations aka CWS VBE intra- inter- Also Known As Course Web Site (http://www.student.cs.uwaterloo.ca/~cs200) Visual Basic Editor a prefix meaning within thus

More information

Excel Skill Module. EPG Workshop. by T. A. Ebert M.E. Rogers

Excel Skill Module. EPG Workshop. by T. A. Ebert M.E. Rogers Excel Skill Module by T. A. Ebert M.E. Rogers Introduction Please become familiar with keyboard shortcuts. They save time, especially with highly repetitive tasks. This module is about developing skills

More information

Basics of Programming with Python

Basics of Programming with Python Basics of Programming with Python A gentle guide to writing simple programs Robert Montante 1 Topics Part 3 Obtaining Python Interactive use Variables Programs in files Data types Decision-making Functions

More information

CS 200. Lecture 05! Excel Scripting. Miscellaneous Notes

CS 200. Lecture 05! Excel Scripting. Miscellaneous Notes CS 200 Lecture 05! 1 Abbreviations aka CWS VBE intra- inter- Also Known As Miscellaneous Notes Course Web Site (http://www.student.cs.uwaterloo.ca/~cs200) Visual Basic Editor a prefix meaning within thus

More information

Get comfortable using computers

Get comfortable using computers Mouse A computer mouse lets us click buttons, pick options, highlight sections, access files and folders, move around your computer, and more. Think of it as your digital hand for operating a computer.

More information

Random numbers program

Random numbers program Fundamentals of Computer Science 2010-2011 Laboratory 11 Vectors (1) Objectives: Acquire abilities in the use of vectors (one-dimensional arrays) Get to know the generation of pseudo-random numbers Lower

More information

Python Intro GIS Week 1. Jake K. Carr

Python Intro GIS Week 1. Jake K. Carr GIS 5222 Week 1 Why Python It s simple and easy to learn It s free - open source! It s cross platform IT S expandable!! Why Python: Example Consider having to convert 1,000 shapefiles into feature classes

More information

Rev. C 11/09/2010 Downers Grove Public Library Page 1 of 41

Rev. C 11/09/2010 Downers Grove Public Library Page 1 of 41 Table of Contents Objectives... 3 Introduction... 3 Excel Ribbon Components... 3 Office Button... 4 Quick Access Toolbar... 5 Excel Worksheet Components... 8 Navigating Through a Worksheet... 8 Making

More information

CSV Roll Documentation

CSV Roll Documentation CSV Roll Documentation Version 1.1 March 2015 INTRODUCTION The CSV Roll is designed to display the contents of a Microsoft Excel worksheet in a Breeze playlist. The Excel worksheet must be exported as

More information

Rev. B 12/16/2015 Downers Grove Public Library Page 1 of 40

Rev. B 12/16/2015 Downers Grove Public Library Page 1 of 40 Objectives... 3 Introduction... 3 Excel Ribbon Components... 3 File Tab... 4 Quick Access Toolbar... 5 Excel Worksheet Components... 8 Navigating Through a Worksheet... 9 Downloading Templates... 9 Using

More information

SCHEME 7. 1 Introduction. 2 Primitives COMPUTER SCIENCE 61A. October 29, 2015

SCHEME 7. 1 Introduction. 2 Primitives COMPUTER SCIENCE 61A. October 29, 2015 SCHEME 7 COMPUTER SCIENCE 61A October 29, 2015 1 Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme programs,

More information

Making Tables and Graphs with Excel. The Basics

Making Tables and Graphs with Excel. The Basics Making Tables and Graphs with Excel The Basics Where do my IV and DV go? Just like you would create a data table on paper, your IV goes in the leftmost column and your DV goes to the right of the IV Enter

More information

Excel 2013 for Beginners

Excel 2013 for Beginners Excel 2013 for Beginners Class Objective: This class will familiarize you with the basics of using Microsoft Excel. Class Outline: Introduction to Microsoft Excel 2013... 1 Microsoft Excel...2-3 Getting

More information

Programming in Java Prof. Debasis Samanta Department of Computer Science Engineering Indian Institute of Technology, Kharagpur

Programming in Java Prof. Debasis Samanta Department of Computer Science Engineering Indian Institute of Technology, Kharagpur Programming in Java Prof. Debasis Samanta Department of Computer Science Engineering Indian Institute of Technology, Kharagpur Lecture 04 Demonstration 1 So, we have learned about how to run Java programs

More information

SCHEME 8. 1 Introduction. 2 Primitives COMPUTER SCIENCE 61A. March 23, 2017

SCHEME 8. 1 Introduction. 2 Primitives COMPUTER SCIENCE 61A. March 23, 2017 SCHEME 8 COMPUTER SCIENCE 61A March 2, 2017 1 Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme programs,

More information

Class #10 Wednesday, November 8, 2017

Class #10 Wednesday, November 8, 2017 Graphics In Excel Before we create a simulation, we need to be able to make a drawing in Excel. The techniques we use here are also used in Mathematica and LabVIEW. Drawings in Excel take place inside

More information

Introduction to Spreadsheets Part 1. The Quick and Easy guide to using Openoffice Calc

Introduction to Spreadsheets Part 1. The Quick and Easy guide to using Openoffice Calc Introduction to Spreadsheets Part 1 The Quick and Easy guide to using Openoffice Calc By the end of the lesson, you will be able to say I know what a spreadsheet is, I can enter simple data into a spreadsheet,

More information

Chapter Four: Loops. Slides by Evan Gallagher. C++ for Everyone by Cay Horstmann Copyright 2012 by John Wiley & Sons. All rights reserved

Chapter Four: Loops. Slides by Evan Gallagher. C++ for Everyone by Cay Horstmann Copyright 2012 by John Wiley & Sons. All rights reserved Chapter Four: Loops Slides by Evan Gallagher The Three Loops in C++ C++ has these three looping statements: while for do The while Loop while (condition) { statements } The condition is some kind of test

More information

Heads Up! (Continued)

Heads Up! (Continued) . Name Date A c t i v i t y 6 Heads Up! (Continued) In this activity, you will do more experiments with simulations and use a calculator program that will quickly simulate multiple coin tosses. The Problem

More information

Lab # 2. For today s lab:

Lab # 2. For today s lab: 1 ITI 1120 Lab # 2 Contributors: G. Arbez, M. Eid, D. Inkpen, A. Williams, D. Amyot 1 For today s lab: Go the course webpage Follow the links to the lab notes for Lab 2. Save all the java programs you

More information

Table of Contents. 1. Cover Page 2. Quote 3. Calculated Fields 4. Show Values As 5. Multiple Data Values 6. Enroll Today!

Table of Contents. 1. Cover Page 2. Quote 3. Calculated Fields 4. Show Values As 5. Multiple Data Values 6. Enroll Today! Table of Contents 1. Cover Page 2. Quote 3. Calculated Fields 4. Show Values As 5. Multiple Data Values 6. Enroll Today! "It is Kind Of fun to do the IMPOSSIBLE" Walt Disney Calculated Fields The purpose

More information

Formulas and Functions

Formulas and Functions Conventions used in this document: Keyboard keys that must be pressed will be shown as Enter or Ctrl. Controls to be activated with the mouse will be shown as Start button > Settings > System > About.

More information

TUTORIAL FOR IMPORTING OTTAWA FIRE HYDRANT PARKING VIOLATION DATA INTO MYSQL

TUTORIAL FOR IMPORTING OTTAWA FIRE HYDRANT PARKING VIOLATION DATA INTO MYSQL TUTORIAL FOR IMPORTING OTTAWA FIRE HYDRANT PARKING VIOLATION DATA INTO MYSQL We have spent the first part of the course learning Excel: importing files, cleaning, sorting, filtering, pivot tables and exporting

More information

Computer Science Lab Exercise 2

Computer Science Lab Exercise 2 osc 127 Lab 2 1 of 10 Computer Science 127 - Lab Exercise 2 Excel User-Defined Functions - Repetition Statements (pdf) During this lab you will review and practice the concepts that you learned last week

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

Common Loop Algorithms 9/21/16 42

Common Loop Algorithms 9/21/16 42 Common Loop Algorithms 9/21/16 42 Common Loop Algorithms 1. Sum and Average Value 2. Coun4ng Matches 3. Promp4ng un4l a Match Is Found 4. Maximum and Minimum 5. Comparing Adjacent Values 9/21/16 43 Sum

More information

Put the Graphs for Each Health Plan on the Same Graph

Put the Graphs for Each Health Plan on the Same Graph At the conclusion of the technology assignment on graphing the total annual cost, you had a graph of each of health insurance plans you are examining. In this technology assignment, you ll combine those

More information

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet. Mr G s Java Jive #2: Yo! Our First Program With this handout you ll write your first program, which we ll call Yo. Programs, Classes, and Objects, Oh My! People regularly refer to Java as a language that

More information

CS 261: Data Structures. Skip Lists

CS 261: Data Structures. Skip Lists CS 261: Data Structures Skip Lists 1 Complexity Lists and Arrays OPERATIONS ORDINARY LISTS AND ARRAYS SORTED ARRAYS SORTED LISTS Add O(1) O(n) O(n) Remove O(n) O(n) O(n) Contains O(n) O(log n) O(n) 2 Sorted

More information