CSCE 120: Learning To Code

Size: px
Start display at page:

Download "CSCE 120: Learning To Code"

Transcription

1 CSCE 120: Learning To Code Organizing Code I Hacktivity 9.1 Introduction Prior to engaging in this hacktivity, you should have completed all of the pre-class activities as outlined in this module. At the start of class, you will be randomly assigned a partner to work with on the entirety of this hacktivity as a peer programming activity. Your instructor will inform you of your partner for this class. One of you will be the driver and the other will take on the navigator role. Recall that a driver is in charge of the keyboard and computer while the navigator is in charge of the handout and directing the activity. However, you are both responsible for contributing and discussing solutions. If you were a driver/navigator in the prior activity, switch roles for this activity. 1 Knowledge Check With your partner, discuss and answer each of the following questions. Write your answers down on a separate sheet of paper or type them up in a plain text file. 1. What is a function signature? What are the three parts of a function s signature? 2. Consider the following piece of code: 1 var x = 10; 2 var y = 20; 3 var z; 4 function compute(a, b) { 5 return (a + b) / 2; 1

2 7 z = compute(x, y); 8 x = compute(y, z); What are the values of the variables x, y, and z after this code executes? 3. Consider the following piece of code: 1 var x = 10; 2 var y; 3 function add(a) { 4 a = a + 5; 5 } 6 y = add(x); What are the values of the variables x, y after this code executes? 4. Consider the following piece of code: 1 function compute(a, b, c) { 2 if(c === undefined) { 3 c = 25; 4 } 5 return (a + b + c) / 3; What value is returned on the following function calls? a) compute(10, 20, 30);, b) compute(10, 20);, c) compute(10);, 5. What syntax would you use to make the add and compute functions part of an object named MyFunctions? 6. What is a callback? How and why would you use one? 7. What is an anonymous function and why would you use one? 2 Warm-up Exercises Download the code we ve provided from GitHub using the URL, com/cbourke/functionexercises. Open the project in Light Table and open the file, exercises.js. Complete the following exercises. 2

3 1. Write a function to convert from Celsius to Fahrenheit. Then write a function to convert from Fahrenheit to Celsius. Test your function with various values. The formulas for these conversions are as follows. c = 5 (f 32) 9 f = 9 5 c + 32 Test your functions with some common values of Celsius and Fahrenheit. 2. Rewrite the two temperature functions to be members of an object named TemperatureUtils 3. Recall that the natural logarithm, ln(x) is the logarithm with base e = You can use the natural logarithm to compute the logarithm using any base b > 0 using the formula log b (x) = ln(x) ln(b) Write the following function that takes two arguments where the second argument is the base, b. However, write your function so that b is optional: if it is not provided, it should use default natural logarithm. 1 function logarithm(x, b) { 2 } Recall that the math library provides a function to compute the natural logarithm: Math.log(). Test your functions with the following values: x = 64, b = 2 should be 6 x = 64, b = e should be x = 64, b = 10 should be An investment may pay you dividends, but over time inflation also tends to reduce your returns. To compute your inflation-adjusted returns, you can use the formula: ( ) 1 + investment return rate inflation rate Write a function that takes two parameters and computes the inflation-adjusted return rate. Both rates are on the scale [0, 1] while the output will be on the scale [0, 100]. Test your function with the following values: Investment Rate Inflation Rate Inflation-Adjusted

4 5. Write a function that takes two numbers: a, b and compares their values. Design the function to return: 1 if a < b 0 if they have the same value 1 if a > b This is known as a comparator function. Name your function cmpnumeric. 6. Write a similar comparator function that takes two student objects a, b and orders them by last name/first name. It should return: 1 if a s name comes before b s name 0 if they have the same names 1 if b s name comes before a s name Be sure to handle the situation where they share the same last name, but different first names. Test your function with several examples using the following formatting. Name your function cmpperson 1 var john = { 2 firstname: "John", 3 lastname: "Student" 4 }; 5 var jane = { 6 firstname: "Jane", 7 lastname: "Doe" 8 }; 7. Write a function that takes an array of numbers as an argument and returns the maximal element in it. 8. Now suppose that we wanted to write a function to find the maximum value in an array of strings. We d have to write another function. Now suppose we wanted to find the maximum value among an array of objects representing students: we would have to write dozens of functions for each criteria (the maximum with respect to name, GPA, class rank, etc.). A better solution would be to write a general purpose getmax() that could work with array of any type of data (not just numbers). To do this, we ll provide the getmax() function with a comparator callback function that is responsible for ordering pairs of data by returning something negative, zero, or something positive depending on the relative ordering of two elements. Consider the following (incomplete) solution. 4

5 1 function getmax(arr, cmp) { 2 var max = arr[0]; 3 for(var i=1; i<arr.length; i++) { 4 if(cmp(max, arr[i]) ) { 5 max = arr[i] 7 } 8 return max; 9 } Discuss what each line in this function does. Then determine what code is missing and implement this function. Fully test your function with the provided data and the comparator functions that you previously implemented. 5

CSCE 120: Learning To Code

CSCE 120: Learning To Code CSCE 120: Learning To Code Processing Data II Hacktivity 10.2 Introduction Prior to engaging in this hacktivity, you should have completed all of the pre-class activities as outlined in this module. At

More information

CSCE 120: Learning To Code

CSCE 120: Learning To Code CSCE 120: Learning To Code Module 9.0: Organizing Code I Introduction to Functions This module is designed to get you started working with functions which allow you to organize code into reusable units

More information

CSCE 156 Computer Science II

CSCE 156 Computer Science II CSCE 156 Computer Science II Lab 04 - Classes & Constructors Dr. Chris Bourke Prior to Lab 1. Review this laboratory handout prior to lab. 2. Read Object Creation tutorial: http://download.oracle.com/javase/tutorial/java/javaoo/objectcreation.

More information

CSCE Java. Dr. Chris Bourke. Prior to Lab. Peer Programming Pair-Up. Lab 15 - Databases & Java Database Connectivity API

CSCE Java. Dr. Chris Bourke. Prior to Lab. Peer Programming Pair-Up. Lab 15 - Databases & Java Database Connectivity API CSCE 155 - Java Lab 15 - Databases & Java Database Connectivity API Dr. Chris Bourke Prior to Lab Before attending this lab: 1. Read and familiarize yourself with this handout. Some additional resources

More information

Part I: Introduction to Functions

Part I: Introduction to Functions Computer Science & Engineering 120 Learning to Code Organizing Code I Functions Part I: Introduction to Functions Christopher M. Bourke cbourke@cse.unl.edu Topic Overview Functions Why Functions? Defining

More information

CSCE Java. Lab 13 - Searching & Sorting. Dr. Chris Bourke

CSCE Java. Lab 13 - Searching & Sorting. Dr. Chris Bourke CSCE 155 - Java Lab 13 - Searching & Sorting Dr. Chris Bourke Prior to Lab Before attending this lab: 1. Read and familiarize yourself with this handout. 2. Review notes on Search & Sorting Some additional

More information

CSCE 120: Learning To Code

CSCE 120: Learning To Code CSCE 120: Learning To Code Manipulating Data I Introduction This module is designed to get you started working with data by understanding and using variables and data types in JavaScript. It will also

More information

CSCE C. Lab 10 - File I/O. Dr. Chris Bourke

CSCE C. Lab 10 - File I/O. Dr. Chris Bourke CSCE 155 - C Lab 10 - File I/O Dr. Chris Bourke Prior to Lab Before attending this lab: 1. Read and familiarize yourself with this handout. 2. Review the following free textbook resources: http://en.wikibooks.org/wiki/c_programming/file_io

More information

CSCE 156 Computer Science II

CSCE 156 Computer Science II CSCE 156 Computer Science II Lab 14 - Stacks & Queues Dr. Chris Bourke Prior to Lab 1. Review this laboratory handout prior to lab. Lab Objectives & Topics Following the lab, you should be able to: Understand

More information

Hot X: Algebra Exposed

Hot X: Algebra Exposed Hot X: Algebra Exposed Solution Guide for Chapter 11 Here are the solutions for the Doing the Math exercises in Hot X: Algebra Exposed! DTM from p.149 2. Since m = 2, our equation will look like this:

More information

Faculty of Engineering Computer Engineering Department Islamic University of Gaza C++ Programming Language Lab # 6 Functions

Faculty of Engineering Computer Engineering Department Islamic University of Gaza C++ Programming Language Lab # 6 Functions Faculty of Engineering Computer Engineering Department Islamic University of Gaza 2013 C++ Programming Language Lab # 6 Functions C++ Programming Language Lab # 6 Functions Objective: To be familiar with

More information

Functions. Lab 4. Introduction: A function : is a collection of statements that are grouped together to perform an operation.

Functions. Lab 4. Introduction: A function : is a collection of statements that are grouped together to perform an operation. Lab 4 Functions Introduction: A function : is a collection of statements that are grouped together to perform an operation. The following is its format: type name ( parameter1, parameter2,...) { statements

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

PLAR e-portfolio Instructions. This is easier and faster than it looks! To create your e-portfolio, you will need to move through the following steps.

PLAR e-portfolio Instructions. This is easier and faster than it looks! To create your e-portfolio, you will need to move through the following steps. PLAR e-portfolio Instructions This is easier and faster than it looks! To create your e-portfolio, you will need to move through the following steps. First, here is a big picture overview of what you are

More information

CSCE 156 Computer Science II

CSCE 156 Computer Science II CSCE 156 Computer Science II Lab 11 - Linked Lists Dr. Chris Bourke Prior to Lab 1. Review this laboratory handout prior to lab. 2. Read the following wiki entry on linked lists: http://en.wikipedia.org/wiki/linked_list

More information

CPS 216, Problem Solving and Programming Techniques in C++ Saleh M. Alnaeli, Ph.D. Spring, Lab_Week2

CPS 216, Problem Solving and Programming Techniques in C++ Saleh M. Alnaeli, Ph.D. Spring, Lab_Week2 CPS 216, Problem Solving and Programming Techniques in C++ Saleh M. Alnaeli, Ph.D. Spring, 2016 Lab_Week2 1 My goals Goals for this problem set: write and evaluate expressions to compute numeric values

More information

Assignment 3 CSCE 155H/RAIK 183H Fall 2016

Assignment 3 CSCE 155H/RAIK 183H Fall 2016 Assignment 3 CSCE 155H/RAIK 183H Fall 2016 Instructions Follow instructions carefully, failure to do so may result in points being deducted. Hand in all your source code files through webhandin and make

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

AP Computer Science Unit 1. Writing Programs Using BlueJ

AP Computer Science Unit 1. Writing Programs Using BlueJ AP Computer Science Unit 1. Writing Programs Using BlueJ 1. Open up BlueJ. Click on the Project menu and select New Project. You should see the window on the right. Navigate to wherever you plan to save

More information

Methods CSC 121 Fall 2014 Howard Rosenthal

Methods CSC 121 Fall 2014 Howard Rosenthal Methods CSC 121 Fall 2014 Howard Rosenthal Lesson Goals Understand what a method is in Java Understand Java s Math Class Learn the syntax of method construction Learn both void methods and methods that

More information

! A program is a set of instructions that the. ! It must be translated. ! Variable: portion of memory that stores a value. char

! A program is a set of instructions that the. ! It must be translated. ! Variable: portion of memory that stores a value. char Week 1 Operators, Data Types & I/O Gaddis: Chapters 1, 2, 3 CS 5301 Fall 2016 Jill Seaman Programming A program is a set of instructions that the computer follows to perform a task It must be translated

More information

Animations involving numbers

Animations involving numbers 136 Chapter 8 Animations involving numbers 8.1 Model and view The examples of Chapter 6 all compute the next picture in the animation from the previous picture. This turns out to be a rather restrictive

More information

Chapter 2 Writing Simple Programs

Chapter 2 Writing Simple Programs Chapter 2 Writing Simple Programs Charles Severance Textbook: Python Programming: An Introduction to Computer Science, John Zelle (www.si182.com) Software Development Process Figure out the problem - for

More information

PLAR e-portfolio Instructions. This is easier and faster than it looks! To create your e-portfolio, you will need to move through the following steps.

PLAR e-portfolio Instructions. This is easier and faster than it looks! To create your e-portfolio, you will need to move through the following steps. PLAR e-portfolio Instructions This is easier and faster than it looks! To create your e-portfolio, you will need to move through the following steps. First, here is a big picture overview of what you are

More information

KOMAR UNIVERSITY OF SCIENCE AND TECHNOLOGY (KUST)

KOMAR UNIVERSITY OF SCIENCE AND TECHNOLOGY (KUST) Programming Concepts & Algorithms Course Syllabus Course Title Course Code Computer Department Pre-requisites Course Code Course Instructor Programming Concepts & Algorithms + lab CPE 405C Computer Department

More information

Lecture 5. Defining Functions

Lecture 5. Defining Functions Lecture 5 Defining Functions Announcements for this Lecture Last Call Quiz: About the Course Take it by tomorrow Also remember the survey Readings Sections 3.5 3.3 today Also 6.-6.4 See online readings

More information

Lesson 20: Every Line is a Graph of a Linear Equation

Lesson 20: Every Line is a Graph of a Linear Equation Student Outcomes Students know that any non vertical line is the graph of a linear equation in the form of, where is a constant. Students write the equation that represents the graph of a line. Lesson

More information

User Defined Functions

User Defined Functions User Defined Functions Aaron S. Donahue Department of Civil and Environmental Engineering and Earth Sciences University of Notre Dame February 27, 2013 CE20140 A. S. Donahue (University of Notre Dame)

More information

Methods CSC 121 Spring 2017 Howard Rosenthal

Methods CSC 121 Spring 2017 Howard Rosenthal Methods CSC 121 Spring 2017 Howard Rosenthal Lesson Goals Understand what a method is in Java Understand Java s Math Class and how to use it Learn the syntax of method construction Learn both void methods

More information

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA 1 TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B. Ericson, and instructor materials prepared

More information

CS 150 Lab 3 Arithmetic and the Debugger. Lab 3.0 We are going to begin using the Visual Studio 2017 debugger to aid with debugging programs.

CS 150 Lab 3 Arithmetic and the Debugger. Lab 3.0 We are going to begin using the Visual Studio 2017 debugger to aid with debugging programs. CS 150 Lab 3 Arithmetic and the Debugger The main objective of today s lab is to use some basic mathematics to solve a few real world problems. In doing so, you are to begin getting accustomed to using

More information

Building Java Programs. Chapter 2: Primitive Data and Definite Loops

Building Java Programs. Chapter 2: Primitive Data and Definite Loops Building Java Programs Chapter 2: Primitive Data and Definite Loops Copyright 2008 2006 by Pearson Education 1 Lecture outline data concepts Primitive types: int, double, char (for now) Expressions: operators,

More information

Fundamentals of Programming Session 8

Fundamentals of Programming Session 8 Fundamentals of Programming Session 8 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2013 These slides have been created using Deitel s slides Sharif University of Technology Outlines

More information

Outline. Review Choice Statements. Review Sequential Flow. Review Choice Before Loops. Review Choice After Loops

Outline. Review Choice Statements. Review Sequential Flow. Review Choice Before Loops. Review Choice After Loops Programming with If Statements using Multiple Conditions Larry Caretto Computer Science 106 Computing in Engineering and Science February 23, 2006 Outline Review last class Program flow controls if s Exercises

More information

Princess Nourah bint Abdulrahman University. Computer Sciences Department

Princess Nourah bint Abdulrahman University. Computer Sciences Department Princess Nourah bint Abdulrahman University 1 And use http://www.w3schools.com/ JavaScript Objectives Introduction to JavaScript Objects Data Variables Operators Types Functions Events 4 Why Study JavaScript?

More information

1. The Normal Distribution, continued

1. The Normal Distribution, continued Math 1125-Introductory Statistics Lecture 16 10/9/06 1. The Normal Distribution, continued Recall that the standard normal distribution is symmetric about z = 0, so the area to the right of zero is 0.5000.

More information

Methods CSC 121 Fall 2016 Howard Rosenthal

Methods CSC 121 Fall 2016 Howard Rosenthal Methods CSC 121 Fall 2016 Howard Rosenthal Lesson Goals Understand what a method is in Java Understand Java s Math Class and how to use it Learn the syntax of method construction Learn both void methods

More information

Programming Exercise 1: Linear Regression

Programming Exercise 1: Linear Regression Programming Exercise 1: Linear Regression Machine Learning Introduction In this exercise, you will implement linear regression and get to see it work on data. Before starting on this programming exercise,

More information

Have the students look at the editor on their computers. Refer to overhead projector as necessary.

Have the students look at the editor on their computers. Refer to overhead projector as necessary. Intro to Programming (Time 15 minutes) Open the programming tool of your choice: If you ve installed, DrRacket, double-click the application to launch it. If you are using the online-tool, click here to

More information

Week 1: Introduction to R, part 1

Week 1: Introduction to R, part 1 Week 1: Introduction to R, part 1 Goals Learning how to start with R and RStudio Use the command line Use functions in R Learning the Tools What is R? What is RStudio? Getting started R is a computer program

More information

DSCI 325: Handout 4 If-Then Statements in SAS Spring 2017

DSCI 325: Handout 4 If-Then Statements in SAS Spring 2017 DSCI 325: Handout 4 If-Then Statements in SAS Spring 2017 IF-THEN STATEMENTS IN SAS We have already worked briefly with IF-THEN statements in SAS. Here, we will discuss using IF-THEN statements in a DATA

More information

CpSc 1011 Lab 4 Formatting and Flow Control Windchill Temps

CpSc 1011 Lab 4 Formatting and Flow Control Windchill Temps CpSc 1011 Lab 4 Formatting and Flow Control Windchill Temps Overview By the end of the lab, you will be able to: use fscanf() to accept inputs from the user and use fprint() for print statements to the

More information

Atlas 5.0 for Microsoft Dynamics AX Advanced reporting system.

Atlas 5.0 for Microsoft Dynamics AX Advanced reporting system. TRAINEE WORKBOOK Atlas 5.0 for Microsoft Dynamics AX Advanced reporting system. Table of Contents 1 Introduction... 4 1.1 Welcome... 4 1.2 About this course... 4 1.2.1 Course description... 4 1.2.2 Audience...

More information

Practice Test - Chapter 1

Practice Test - Chapter 1 Determine whether the given relation represents y as a function of x. 1. y 3 x = 5 When x = 1, y = ±. Therefore, the relation is not one-to-one and not a function. not a function 4. PARKING The cost of

More information

Web Site Development with HTML/JavaScrip

Web Site Development with HTML/JavaScrip Hands-On Web Site Development with HTML/JavaScrip Course Description This Hands-On Web programming course provides a thorough introduction to implementing a full-featured Web site on the Internet or corporate

More information

M I C R O S O F T A C C E S S : P A R T 2 G E T T I N G I N F O R M A T I O N O U T O F Y O U R D A T A

M I C R O S O F T A C C E S S : P A R T 2 G E T T I N G I N F O R M A T I O N O U T O F Y O U R D A T A M I C R O S O F T A C C E S S 2 0 1 0 : P A R T 2 G E T T I N G I N F O R M A T I O N O U T O F Y O U R D A T A Michael J. Walk ALC Instructor michael@jwalkonline.org www.jwalkonline.org/main @MichaelJWalk

More information

3.1 Generating Inverses of Functions 263

3.1 Generating Inverses of Functions 263 3.1 Generating Inverses of Functions FOCUSING QUESTION What is the inverse of a function? LEARNING OUTCOMES I can compare and contrast the key attributes of a function and its inverse when I have the function

More information

23.2 Normal Distributions

23.2 Normal Distributions 1_ Locker LESSON 23.2 Normal Distributions Common Core Math Standards The student is expected to: S-ID.4 Use the mean and standard deviation of a data set to fit it to a normal distribution and to estimate

More information

Many logarithms may be calculated by converting them to exponential form. Suppose we want to calculate the value of log. log 16?

Many logarithms may be calculated by converting them to exponential form. Suppose we want to calculate the value of log. log 16? Question : How do you evaluate a arithm? Many arithms may be calculated by converting them to exponential form. Suppose we want to calculate the value of arithmic form, 16. Start by writing this expression

More information

Laboratory 1: Eclipse and Karel the Robot

Laboratory 1: Eclipse and Karel the Robot Math 121: Introduction to Computing Handout #2 Laboratory 1: Eclipse and Karel the Robot Your first laboratory task is to use the Eclipse IDE framework ( integrated development environment, and the d also

More information

mith College CSC 111 Introduction to Computer Science Spring 2018 Week 2 Dominique Thiébaut

mith College CSC 111 Introduction to Computer Science Spring 2018 Week 2 Dominique Thiébaut mith College Computer Science CSC 111 Introduction to Computer Science Spring 2018 Week 2 Dominique Thiébaut dthiebaut@smith.edu Outline Moodle Access Piazza Homework partners Loops + range() Input Programming

More information

1. On a separate sheet of paper, the recorder will write the original equation. 2x + 8 = 14 or 2(x + 4) = 14

1. On a separate sheet of paper, the recorder will write the original equation. 2x + 8 = 14 or 2(x + 4) = 14 1 TASK 2.9.1: ALGEBRA TILES Solutions Work with a partner. One person will use the tiles to solve the equations. The partner will record the steps symbolically. Both will answer the questions. 1. On a

More information

CSCI Compiler Design

CSCI Compiler Design CSCI 565 - Compiler Design Spring 2015 Midterm Exam March 04, 2015 at 8:00 AM in class (RTH 217) Duration: 2h 30 min. Please label all pages you turn in with your name and student number. Name: Number:

More information

Lesson Plan. Course Title: Principles of Information Technology Session Title: Intro to Databases Lesson Duration: Varies dependent upon instructor

Lesson Plan. Course Title: Principles of Information Technology Session Title: Intro to Databases Lesson Duration: Varies dependent upon instructor Lesson Plan Course Title: Principles of Information Technology Session Title: Intro to Databases Lesson Duration: Varies dependent upon instructor Performance Objective: Upon completion of this lesson,

More information

M I C R O S O F T A C C E S S : P A R T 2 G E T T I N G I N F O R M A T I O N O U T O F Y O U R D A T A

M I C R O S O F T A C C E S S : P A R T 2 G E T T I N G I N F O R M A T I O N O U T O F Y O U R D A T A M I C R O S O F T A C C E S S 2 0 1 3 : P A R T 2 G E T T I N G I N F O R M A T I O N O U T O F Y O U R D A T A Michael J. Walk ALC Instructor michael@jwalkonline.org www.jwalkonline.org/main @MichaelJWalk

More information

Compiling C/C++ programs

Compiling C/C++ programs Name: Student ID: Lab Instructor: Borja Sotomayor Do not write in this area 1 2 3 TOTAL Maximum possible points: 20 + 2 NOTE: The lab session will take place in the Linux machines of the Maclab. This lab

More information

Spring CS Homework 6 p. 1. CS Homework 6

Spring CS Homework 6 p. 1. CS Homework 6 Spring 2018 - CS 111 - Homework 6 p. 1 Deadline 11:59 pm on Friday, March 9, 2018 Purpose CS 111 - Homework 6 To practice with some C++ basics, including following design recipe steps for designing and

More information

Math 2250 Lab #3: Landing on Target

Math 2250 Lab #3: Landing on Target Math 2250 Lab #3: Landing on Target 1. INTRODUCTION TO THE LAB PROGRAM. Here are some general notes and ideas which will help you with the lab. The purpose of the lab program is to expose you to problems

More information

New York University Computer Science Department Courant Institute of Mathematical Sciences

New York University Computer Science Department Courant Institute of Mathematical Sciences New York University Computer Science Department Courant Institute of Mathematical Sciences Course Title: Data Communication & Networks Course Number: g22.2662-001 Instructor: Jean-Claude Franchitti Session:

More information

AP Computer Science Unit 1. Writing Programs Using BlueJ

AP Computer Science Unit 1. Writing Programs Using BlueJ AP Computer Science Unit 1. Writing Programs Using BlueJ 1. Open up BlueJ. Click on the Project menu and select New Project. You should see the window on the right. Navigate to wherever you plan to save

More information

2. INTRODUCTORY EXCEL

2. INTRODUCTORY EXCEL CS130 - Introductory Excel 1 2. INTRODUCTORY EXCEL Fall 2017 CS130 - Introductory Excel 2 Introduction to Excel What is Microsoft Excel? What can we do with Excel? CS130 - Introductory Excel 3 Launch Excel

More information

Functions. Rich Enbody. From Mathematics we know that functions perform some operation and return one value.

Functions. Rich Enbody. From Mathematics we know that functions perform some operation and return one value. Functions Rich Enbody From Mathematics we know that functions perform some operation and return one value. 2 1 Functions encapsulate the performance of some operation, so it can be used by others. (for

More information

Math Calculus f. Business and Mgmt - Worksheet 9. Solutions for Worksheet 9 - Piecewise Defined Functions and Continuity

Math Calculus f. Business and Mgmt - Worksheet 9. Solutions for Worksheet 9 - Piecewise Defined Functions and Continuity Math 220 - Calculus f. Business and Mgmt - Worksheet 9 Solutions for Worksheet 9 - Piecewise Defined Functions and Continuity Evaluating and Graphing Functions Exercise 1: Compose these pairs of functions

More information

Using Templates to Make Labels

Using Templates to Make Labels Using Templates to Make Labels You can create all kinds of labels in Word Labels aren t just for file folders. You can make your own return address labels, or you can make address labels for everyone on

More information

Microsoft Outlook 2007 Contacts

Microsoft Outlook 2007 Contacts Outline Contacts... 1 Create a contact card from an incoming email message... 1 Create a contact card from scratch... 2 Send email to contact... 2 Option 1... 2 Option 2... 3 Displaying in LastName, FirstName

More information

COMP 111 PROGRAMMING I MODULARITY USING FUNCTIONS

COMP 111 PROGRAMMING I MODULARITY USING FUNCTIONS COMP 111 PROGRAMMING I MODULARITY USING FUNCTIONS Instructor: Dr Dionysiou ADMINISTRATIVE This week s lecture [BRON06] Chapter 6 (6.1) What is a function? Function declaration (prototype) Function definition

More information

In math, the rate of change is called the slope and is often described by the ratio rise

In math, the rate of change is called the slope and is often described by the ratio rise Chapter 3 Equations of Lines Sec. Slope The idea of slope is used quite often in our lives, however outside of school, it goes by different names. People involved in home construction might talk about

More information

Introduction to DATA Step Programming: SAS Basics II. Susan J. Slaughter, Avocet Solutions

Introduction to DATA Step Programming: SAS Basics II. Susan J. Slaughter, Avocet Solutions Introduction to DATA Step Programming: SAS Basics II Susan J. Slaughter, Avocet Solutions SAS Essentials Section for people new to SAS Core presentations 1. How SAS Thinks 2. Introduction to DATA Step

More information

Guidelines for Writing Mathematical Proofs

Guidelines for Writing Mathematical Proofs Appendix A Guidelines for Writing Mathematical Proofs One of the most important forms of mathematical writing is writing mathematical proofs. The writing of mathematical proofs is an acquired skill and

More information

15. PARAMETRIZED CURVES AND GEOMETRY

15. PARAMETRIZED CURVES AND GEOMETRY 15. PARAMETRIZED CURVES AND GEOMETRY Parametric or parametrized curves are based on introducing a parameter which increases as we imagine travelling along the curve. Any graph can be recast as a parametrized

More information

BlueMix Hands-On Workshop Lab A - Building and Deploying BlueMix Applications

BlueMix Hands-On Workshop Lab A - Building and Deploying BlueMix Applications BlueMix Hands-On Workshop Lab A - Building and Deploying BlueMix Applications Version : 4.00 Last modification date : 13 June 2014 Owner : IBM Ecosystem Development Table of Contents Part 1: Building

More information

Introduction to Programming. January Examination Paper. Time: 3 hours

Introduction to Programming. January Examination Paper. Time: 3 hours Introduction to Programming January 2016 Examination Paper Answer ALL questions. Produce a Word document using the instructions provided in the Background information section. Time: 3 hours The maximum

More information

12 and the critical numbers of f ( )

12 and the critical numbers of f ( ) Math 1314 Lesson 15 Second Derivative Test and Optimization There is a second derivative test to find relative extrema. It is sometimes convenient to use; however, it can be inconclusive. Later in the

More information

Introduction to DATA Step Programming SAS Basics II. Susan J. Slaughter, Avocet Solutions

Introduction to DATA Step Programming SAS Basics II. Susan J. Slaughter, Avocet Solutions Introduction to DATA Step Programming SAS Basics II Susan J. Slaughter, Avocet Solutions SAS Essentials Section for people new to SAS Core presentations 1. How SAS Thinks 2. Introduction to DATA Step Programming

More information

Configure App Service Authentication for Your Azure Web App

Configure App Service Authentication for Your Azure Web App Azure Web App Security Labs Page 1 of 12 Configure App Service Authentication for Your Azure Web App Introduction This lab is part of a series. This second lab will show you how to set up Azure App Service

More information

Basics. Jhan Schmitz SCSH Computer Club January 23, 2014

Basics. Jhan Schmitz SCSH Computer Club January 23, 2014 Jhan Schmitz SCSH Computer Club January 23, 2014 Agenda What is Excel? Versions of Excel Creating and Building a New Excel Workbook: Excel Basic Basics Starting Simply Fahrenheit to Celsius Extending What

More information

WARM UP LESSONS BARE BASICS

WARM UP LESSONS BARE BASICS WARM UP LESSONS BARE BASICS CONTENTS Common primitive data types for variables... 2 About standard input / output... 2 More on standard output in C standard... 3 Practice Exercise... 6 About Math Expressions

More information

Contracts, Purpose Statements, Examples and Tests

Contracts, Purpose Statements, Examples and Tests Contracts, Purpose Statements, Examples and Tests CS 5010 Program Design Paradigms Bootcamp Lesson 2.1 Mitchell Wand, 2012-2017 This work is licensed under a Creative Commons Attribution-NonCommercial

More information

SI Networked Computing: Storage, Communication, and Processing, Winter 2009

SI Networked Computing: Storage, Communication, and Processing, Winter 2009 University of Michigan Deep Blue deepblue.lib.umich.edu 2009-01 SI 502 - Networked Computing: Storage, Communication, and Processing, Winter 2009 Severance, Charles Severance, C. (2008, December 19). Networked

More information

Window (further define the behaviour of objects)

Window (further define the behaviour of objects) Introduction to Visual Basic Visual Basic offers a very comprehensive programming environment that can be a bit overwhelming at the start. The best rule is to ignore all that you do not need until you

More information

Web Application Development

Web Application Development Web Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie JavaScript JAVASCRIPT FUNDAMENTALS Agenda

More information

1 Introduction Java, the beginning Java Virtual Machine A First Program BlueJ Raspberry Pi...

1 Introduction Java, the beginning Java Virtual Machine A First Program BlueJ Raspberry Pi... Contents 1 Introduction 3 1.1 Java, the beginning.......................... 3 1.2 Java Virtual Machine........................ 4 1.3 A First Program........................... 4 1.4 BlueJ.................................

More information

DEPARTMENT OF ACADEMIC UPGRADING

DEPARTMENT OF ACADEMIC UPGRADING DEPARTMENT OF ACADEMIC UPGRADING COURSE OUTLINE WINTER 2014 INTRODUCTION TO MATH 0081 INSTRUCTOR: Joelle Reynolds PHONE: (780) 539-2810 or 2204 OFFICE: Math Lab A210 E-MAIL: jreynolds@gprc.ab.ca OFFICE

More information

TRAINEE WORKBOOK. Atlas 5.0 for Microsoft Dynamics AX 2012 Reporting system

TRAINEE WORKBOOK. Atlas 5.0 for Microsoft Dynamics AX 2012 Reporting system TRAINEE WORKBOOK Atlas 5.0 for Microsoft Dynamics AX 2012 Reporting system COPYRIGHT NOTICE Copyright 2011, Globe Software Pty Ltd, All rights reserved. Trademarks Dynamics AX, IntelliMorph, and X++ have

More information

Math 1: Solutions to Written Homework 1 Due Friday, October 3, 2008

Math 1: Solutions to Written Homework 1 Due Friday, October 3, 2008 Instructions: You are encouraged to work out solutions to these problems in groups! Discuss the problems with your classmates, the tutors and/or the instructors. After working doing so, please write up

More information

Functions! Objectives! 1E3! Topic 9! programming! n This topic should allow students to! n Read chapter 6 of the textbook now.!

Functions! Objectives! 1E3! Topic 9! programming! n This topic should allow students to! n Read chapter 6 of the textbook now.! Functions 1E3 Topic 9 9 Functions 1 Objectives n This topic should allow students to n Understand the importance of abstraction in programming n Recognise when a function would be useful. n Design appropriate

More information

ADVANCED MS EXCEL 2007 USEFUL FUNCTIONS & FORMULAS FOR DAILY USE

ADVANCED MS EXCEL 2007 USEFUL FUNCTIONS & FORMULAS FOR DAILY USE ADVANCED MS EXCEL 2007 USEFUL FUNCTIONS & FORMULAS FOR DAILY USE Objectives This workshop will explore the advanced functions available in Excel 2007 to facilitate your work. It will introduce the useful

More information

Outline for Today CSE 142. CSE142 Wi03 G-1. withdraw Method for BankAccount. Class Invariants

Outline for Today CSE 142. CSE142 Wi03 G-1. withdraw Method for BankAccount. Class Invariants CSE 142 Outline for Today Conditional statements if Boolean expressions Comparisons (=,!=, ==) Boolean operators (and, or, not - &&,,!) Class invariants Conditional Statements & Boolean Expressions

More information

Mathematical Modeling

Mathematical Modeling 6/19/2015 CCGPS Advanced Algebra CCGPS Advanced Algebra Mathematical Modeling Mathematical Modeling Have you ever wondered how a plane flies or what makes your MP3 player actually work? Have you compared

More information

EXCEL 98 TUTORIAL Chemistry C2407 fall 1998 Andy Eng, Columbia University 1998

EXCEL 98 TUTORIAL Chemistry C2407 fall 1998 Andy Eng, Columbia University 1998 Created on 09/02/98 11:58 PM 1 EXCEL 98 TUTORIAL Chemistry C2407 fall 1998 Andy Eng, Columbia University 1998 Note for Excel 97 users: All features of Excel 98 for Macintosh are available in Excel 97 for

More information

COMPUTER APPLICATION

COMPUTER APPLICATION Total No. of Printed Pages 16 HS/XII/A.Sc.Com/CAP/14 2 0 1 4 COMPUTER APPLICATION ( Science / Arts / Commerce ) ( Theory ) Full Marks : 70 Time : 3 hours The figures in the margin indicate full marks for

More information

How to turn on the computer: How to log on to the TC network: How to use the mouse: Essential Computer Skills

How to turn on the computer: How to log on to the TC network: How to use the mouse: Essential Computer Skills How to turn on the computer: Essential Computer Skills In most of the computer labs at Temple College, you ll find the on/off button on the front of the computer s system box. It is not marked and is flush

More information

Multiplying and Dividing Rational Expressions

Multiplying and Dividing Rational Expressions COMMON CORE Locker LESSON 9. Multiplying and Dividing Rational Expressions Name Class Date 9. Multiplying and Dividing Rational Expressions Essential Question: How can you multiply and divide rational

More information

COMP284 Scripting Languages Lecture 15: JavaScript (Part 2) Handouts

COMP284 Scripting Languages Lecture 15: JavaScript (Part 2) Handouts COMP284 Scripting Languages Lecture 15: JavaScript (Part 2) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool

More information

CS 115 Exam 1, Fall 2015 Thu. 09/24/2015

CS 115 Exam 1, Fall 2015 Thu. 09/24/2015 CS 115 Exam 1, Fall 2015 Thu. 09/24/2015 Name: Section: Rules and Hints You may use one handwritten 8.5 11 cheat sheet (front and back). This is the only additional resource you may consult during this

More information

(2 1) What does evaluate to? What does evaluate to? What does evaluate to?

(2 1) What does evaluate to? What does evaluate to? What does evaluate to? Order of Operations (Time 20 minutes) Math is a language, just like English, Spanish, or any other language. We use nouns, like "bread", "tomato", "mustard" and "cheese" to describe physical objects. Math

More information

Programming. We will be introducing various new elements of Python and using them to solve increasingly interesting and complex problems.

Programming. We will be introducing various new elements of Python and using them to solve increasingly interesting and complex problems. Plan for the rest of the semester: Programming We will be introducing various new elements of Python and using them to solve increasingly interesting and complex problems. We saw earlier that computers

More information

Number Sense. I CAN DO THIS! Third Grade Mathematics Name. Problems or Examples. 1.1 I can count, read, and write whole numbers to 10,000.

Number Sense. I CAN DO THIS! Third Grade Mathematics Name. Problems or Examples. 1.1 I can count, read, and write whole numbers to 10,000. Number Sense 1.1 I can count, read, and write whole numbers to 10,000. 1.2 I can compare and order numbers to 10,000. What is the smallest whole number you can make using the digits 4, 3, 9, and 1? Use

More information

The Specification Phase

The Specification Phase The Specification Phase CS427: Elements of Software Engineering Lecture 4.1 10am, 30 Jan 2012 CS427 The Specification Phase 1/16 Outline 1 Recall... The Requirements Phase 2 Phase 2: Specifications 3 Requirements

More information

Object Oriented Methods : Deeper Look Lecture Three

Object Oriented Methods : Deeper Look Lecture Three University of Babylon Collage of Computer Assistant Lecturer : Wadhah R. Baiee Experience has shown that the best way to develop and maintain a large program is to construct it from small, simple pieces,

More information