Part 1 Simple Arithmetic

Size: px
Start display at page:

Download "Part 1 Simple Arithmetic"

Transcription

1 California State University, Sacramento College of Engineering and Computer Science Computer Science 10A: Accelerated Introduction to Programming Logic Activity B Variables, Assignments, and More Computers were originally designed for their fantastic ability to perform complex math. That hasn t changed much over the many, many decades since the first mainframes. Even today, most of our favorite applications make use of complex math (behind the scenes). For example, the video games that you play (rather than study) are heavily reliant on computations from determining the path of a projectile, the gravity under your avatar s feet, and even things like making realistic shadows, shading, and mist. Part 1 Simple Arithmetic It's time to use one of the most important features of any programming language variables. 1. Create a new Flowgorithm flowchart. 2. Insert an assignment statement into your flowchart. A rectangle shape should show up. 3. Open the assignment dialog box the same way you did with Output in the last activity. (Double-click) 4. In the Variable box, type: age 5. In the Expression box, type: 18 (or whatever your age is). You have now created the assignment statement: age = Execute your flowchart Whoops. That didn't work. Look at the error message. It seems that Flowgorithm requires a variable to be declared before it can be used. So far in this exercise, you've only dealt with variables that store numbers, but variables can store individual characters, strings, and even some other stuff. NOTE: Declaring Variables In most modern programming languages, it is required that you "declare" your variables before you can use them. That is, you have to tell the program what kind of data you plan to store and what you will name it. Yes, it's annoying. But, it's actually a good idea. You'll appreciate it in time. 7. Add a Declare box to the beginning of your flowchart. Place it before the assignment. We are going to be storing whole numbers, so set the type to Integer.

2 2 8. Trying executing it again. Ah, good. That worked. It didn't do anything you could see, but at least it didn't crash. EXPLORE: Chart Styles The flowcharts used by Flowgorithm look a tad different from the one used by your textbook. That's not a surprise. There are many different ways of drawing flowcharts. If you want Flowgorithm to look exactly like the textbook, it can! From the menu, select Edit Choose Chart Style. In the "Chart Style" dropdown, select "Gaddis". Part 2 Uninitialized Variables In some programming languages, if you don't assign a value to a variable, the language automatically initializes. Relying on that automatic initialization gets you into bad habits. You need to be in charge! If you want a value in a variable, put it there! For purposes of this course (and many future courses), any variable which is supposed to have some initial value must be explicitly assigned by you. Failure to do so will be considered an error (sloppy programming), even if the language lets you! 1. Let's so something more exciting than just assigning your age. Create declarations for two variables named graduate and years. These will both be integers. Remember to put these at the beginning of your flowchart. 2. Now, let's figure out how old you will be when you graduate from Sac State. Create another assignment statement to set graduate= age + years. 3. Don't assign anything to years yet. 4. Let's output the contents of the graduate variable. Create an Output shape and type the name graduate. You can remove the one that just outputs your age. 5. Execute. Whoops! Flowgorithm did not like that. Read the error message carefully. It appears that the years variable was uninitialized. 6. Added an assignment statement that stores 4 into years. Look very carefully where you should put this. 7. If you did everything correctly, the output should be your age plus 4. If something else happens, you ve made a mistake. Try to solve it. If you can t, call for help. Part 3 Value of a Variable Let's try an experiment. 1. Change the output statement. Rather than outputting the value of graduate, let's output the word graduate. (Put it in quotes.) 2. Execute and observe the results.

3 3 3. After you see the result, change the output box back to the correct approach. If you want the value of a variable, you use the variable name. If you put a name in quotes, you are no longer dealing with the value of the variable, just a bunch of letters, i.e., a string. Please, re-read the paragraph above. It is important! Don t go on until you understand the difference between outputting "graduate" and outputting graduate. Part 4 Better Output If you were actually writing a program for a human end-user, that user would not be a programmer he/she would not read the program. They would just look at the result. Therefore, you need to make the results "meaningful." 1. Open your output shape the one that displays the age you will graduate. 2. Let's output your age, but make it read "My age will be " and then the graduate variable. Remember the ampersand variable? "My age will be " & graduate 3. Execute and observe the results. This is what is meant by an "output label". Think carefully about what you've done. You could have gotten the right original result by using an output box with "My age will be 22" in it. But if the program was changed (the value of age or years), the result would still output 22. That's why you use a combination of literal strings (the stuff inside the quotes) and variables (outside quotes) and the ampersand to join them (concatenate them) for output. NOTE: Echoing This output operation demonstrates a concept called "echoing" we "echo" the values used in the calculation in the actual output (in this case, the values 11 and 9). Often, it is a very useful thing to do, and we'll do it quite a bit. There are times when it is not as useful, but for now, consider it a good thing to echo the values. Part 5 Improving the Output Label 1. Change the output operation so that it results in this output: I'm 18 and in 4 years I will be 22. Be sure you are using an appropriate combination of literal strings and variables. The 18, the 4, and the 18 should all be values of variables. 2. Execute and observe the results. Make sure you have appropriate blanks in there. (Blanks inside quotes are just like any other characters.) 3. To make sure you have made correct use of variables, change the years variable to 5 (yes, it often takes five years to graduate) 4. Execute and observe the results. If the output changes to I'm 18 and in 5 years I will be 23, you're on the right track!

4 Part 6 String Variables 4 Not all variables store numbers. Here's an example using variables that store "strings". As you learned previously, string in computer programming means any combination of alphabetic and numeric characters, plus punctuation, spaces, etc. In most languages, literal strings are enclosed in double-quotes. 1. Create two assignment shapes (and declares). The first assigns your own name (first and last) to the variable name. The second one will assign your major. Don't forget quotes. 2. Now provide an output operation that looks like this: "My name is " & Name "." 3. Execute and observe the results. EXPLORE: Console Formatting You noticed that the Console Window looks like you chatting on your phone. Traditionally, the Console Window displays just simple, and plain, text. If you want to use the text-only format, you can click on the icon on the top of the Window. Well, that is interesting! You have a somewhat user-friendly program now. Let's use all the variables you have created (name, major, age, years and graduate). Your flowchart has two output statements. The first one outputs your graduation age and the other your name. 4. Remove both the output statements 5. Add a new output statement that will output the following. The contents of your name, age, years, graduate age and major will all be read from variables. My name is Joe Gunchy, I'm 18 and in 5 years I will have Computer Science degree when I am 23. Part 7 Input and Prompting the User Up to now, the Flowgorithm flowcharts have really been pretty useless. Every time you execute the flowchart, you get exactly the same output. That's because you've used only assignment statements to give values to variables. In order to give a variable a different value, you would have to go in and change the flowchart. The missing element is input. The Input Statement gives us a way to put values into variables while the program is executing, rather than only while we are writing the program. This way, we can execute the same program twice, but get completely different output, because each time we execute the program, we put in different values. 1. Replace each assignment statement (age, name, and major) with input statements. 2. Execute and observe the results. Wow! Much better! But that wasn't very user friendly! Sure, it worked. But, it just wanted you to type in a value without telling you what is wanted. The Console Window displays the variable name so that helps a little. But what if the variable name was x or value? Yup, not much help at all. So, let's not rely on that.

5 We need the program to tell us what it needs us to enter. This, in computer science, is called a "prompt". You have seen these a lot (unless you never used a computer before today) Now add an Output Statement before each input. The output statement should tell the user what to enter. 4. Execute your program. Isn't that better? Save your program. You will turn this in.

Part 1 - Your First algorithm

Part 1 - Your First algorithm California State University, Sacramento College of Engineering and Computer Science Computer Science 10: Introduction to Programming Logic Spring 2016 Activity A Introduction to Flowgorithm Flowcharts

More information

Part 1 - Your First algorithm

Part 1 - Your First algorithm California State University, Sacramento College of Engineering and Computer Science Computer Science 10A: Accelerated Introduction to Programming Logic Spring 2017 Activity A Introduction to Flowgorithm

More information

Part 1 Arithmetic Operator Precedence

Part 1 Arithmetic Operator Precedence California State University, Sacramento College of Engineering and Computer Science Computer Science 10: Introduction to Programming Logic Activity C Expressions Computers were originally designed for

More information

Part 1 Your First Function

Part 1 Your First Function California State University, Sacramento College of Engineering and Computer Science and Snarky Professors Computer Science 10517: Super Mega Crazy Accelerated Intro to Programming Logic Spring 2016 Activity

More information

printf( Please enter another number: ); scanf( %d, &num2);

printf( Please enter another number: ); scanf( %d, &num2); CIT 593 Intro to Computer Systems Lecture #13 (11/1/12) Now that we've looked at how an assembly language program runs on a computer, we're ready to move up a level and start working with more powerful

More information

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to A PROGRAM IS A SEQUENCE of instructions that a computer can execute to perform some task. A simple enough idea, but for the computer to make any use of the instructions, they must be written in a form

More information

Chapter 2. Designing a Program. Input, Processing, and Output Fall 2016, CSUS. Chapter 2.1

Chapter 2. Designing a Program. Input, Processing, and Output Fall 2016, CSUS. Chapter 2.1 Chapter 2 Input, Processing, and Output Fall 2016, CSUS Designing a Program Chapter 2.1 1 Algorithms They are the logic on how to do something how to compute the value of Pi how to delete a file how to

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

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications Hello World! Computer Programming for Kids and Other Beginners by Warren Sande and Carter Sande Chapter 1 Copyright 2009 Manning Publications brief contents Preface xiii Acknowledgments xix About this

More information

(Refer Slide Time: 00:23)

(Refer Slide Time: 00:23) In this session, we will learn about one more fundamental data type in C. So, far we have seen ints and floats. Ints are supposed to represent integers and floats are supposed to represent real numbers.

More information

MITOCW watch?v=kz7jjltq9r4

MITOCW watch?v=kz7jjltq9r4 MITOCW watch?v=kz7jjltq9r4 PROFESSOR: We're going to look at the most fundamental of all mathematical data types, namely sets, and let's begin with the definitions. So informally, a set is a collection

More information

Text Input and Conditionals

Text Input and Conditionals Text Input and Conditionals Text Input Many programs allow the user to enter information, like a username and password. Python makes taking input from the user seamless with a single line of code: input()

More information

The Stack, Free Store, and Global Namespace

The Stack, Free Store, and Global Namespace Pointers This tutorial is my attempt at clarifying pointers for anyone still confused about them. Pointers are notoriously hard to grasp, so I thought I'd take a shot at explaining them. The more information

More information

Running Wordstar 6 on Windows 7 Using vdos

Running Wordstar 6 on Windows 7 Using vdos Running Wordstar 6 on Windows 7 Using vdos Thanks to Dennis McCunney for helping me learn how to set vdos up. DISCLAIMER #1: As explained below, I am running Wordstar 6 for DOS on a Windows 7 (64- bit)

More information

Robert Ragan s TOP 3

Robert Ragan s TOP 3 Robert Ragan s TOP 3 Internet Genealogy Research POWER TECHNIQUES that Have Stunned Audiences POWER TECHNIQUES TWO: Robert s Unique "Gather, Store and Quick Find Method." You'll have to see it to believe

More information

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners Getting Started Excerpted from Hello World! Computer Programming for Kids and Other Beginners EARLY ACCESS EDITION Warren D. Sande and Carter Sande MEAP Release: May 2008 Softbound print: November 2008

More information

MITOCW ocw f99-lec12_300k

MITOCW ocw f99-lec12_300k MITOCW ocw-18.06-f99-lec12_300k This is lecture twelve. OK. We've reached twelve lectures. And this one is more than the others about applications of linear algebra. And I'll confess. When I'm giving you

More information

Introduction to Programming

Introduction to Programming CHAPTER 1 Introduction to Programming Begin at the beginning, and go on till you come to the end: then stop. This method of telling a story is as good today as it was when the King of Hearts prescribed

More information

Introduction. Using Styles. Word 2010 Styles and Themes. To Select a Style: Page 1

Introduction. Using Styles. Word 2010 Styles and Themes. To Select a Style: Page 1 Word 2010 Styles and Themes Introduction Page 1 Styles and themes are powerful tools in Word that can help you easily create professional looking documents. A style is a predefined combination of font

More information

Introduction to the Emacs Editor

Introduction to the Emacs Editor Introduction to the Emacs Editor Scott D. Anderson Wellesley College Scott.Anderson@acm.org c Fall 2004 1 What is Emacs? Emacs is an editor: a program that allows you to modify files. Many of you have

More information

How to Improve Your Campaign Conversion Rates

How to Improve Your  Campaign Conversion Rates How to Improve Your Email Campaign Conversion Rates Chris Williams Author of 7 Figure Business Models How to Exponentially Increase Conversion Rates I'm going to teach you my system for optimizing an email

More information

Post Experiment Interview Questions

Post Experiment Interview Questions Post Experiment Interview Questions Questions about the Maximum Problem 1. What is this problem statement asking? 2. What is meant by positive integers? 3. What does it mean by the user entering valid

More information

4. Write sets of directions for how to check for direct variation. How to check for direct variation by analyzing the graph :

4. Write sets of directions for how to check for direct variation. How to check for direct variation by analyzing the graph : Name Direct Variations There are many relationships that two variables can have. One of these relationships is called a direct variation. Use the description and example of direct variation to help you

More information

Yup, left blank on purpose. You can use it to draw whatever you want :-)

Yup, left blank on purpose. You can use it to draw whatever you want :-) Yup, left blank on purpose. You can use it to draw whatever you want :-) Chapter 1 The task I have assigned myself is not an easy one; teach C.O.F.F.E.E. Not the beverage of course, but the scripting language

More information

Linked Lists. What is a Linked List?

Linked Lists. What is a Linked List? Linked Lists Along with arrays, linked lists form the basis for pretty much every other data stucture out there. This makes learning and understand linked lists very important. They are also usually the

More information

BEGINNER PHP Table of Contents

BEGINNER PHP Table of Contents Table of Contents 4 5 6 7 8 9 0 Introduction Getting Setup Your first PHP webpage Working with text Talking to the user Comparison & If statements If & Else Cleaning up the game Remembering values Finishing

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

Watson Conversation Cheat Sheet

Watson Conversation Cheat Sheet Watson Conversation Cheat Sheet This cheat sheet assumes a Watson Conversation Service and a Conversation Workspace have been created and you can access the service. Open the service and click the Launch

More information

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */ Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,

More information

Troubleshooting Maple Worksheets: Common Problems

Troubleshooting Maple Worksheets: Common Problems Troubleshooting Maple Worksheets: Common Problems So you've seen plenty of worksheets that work just fine, but that doesn't always help you much when your worksheet isn't doing what you want it to. This

More information

MITOCW watch?v=se4p7ivcune

MITOCW watch?v=se4p7ivcune MITOCW watch?v=se4p7ivcune 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

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 [talking head] Formal Methods of Software Engineering means the use of mathematics as an aid to writing programs. Before we can

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

5. Control Statements

5. Control Statements 5. Control Statements This section of the course will introduce you to the major control statements in C++. These control statements are used to specify the branching in an algorithm/recipe. Control statements

More information

Functional Programming in Haskell Prof. Madhavan Mukund and S. P. Suresh Chennai Mathematical Institute

Functional Programming in Haskell Prof. Madhavan Mukund and S. P. Suresh Chennai Mathematical Institute Functional Programming in Haskell Prof. Madhavan Mukund and S. P. Suresh Chennai Mathematical Institute Module # 02 Lecture - 03 Characters and Strings So, let us turn our attention to a data type we have

More information

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. Guide to and Hi everybody! In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. This guide focuses on two of those symbols: and. These symbols represent concepts

More information

CSI Lab 02. Tuesday, January 21st

CSI Lab 02. Tuesday, January 21st CSI Lab 02 Tuesday, January 21st Objectives: Explore some basic functionality of python Introduction Last week we talked about the fact that a computer is, among other things, a tool to perform high speed

More information

Starting. Read: Chapter 1, Appendix B from textbook.

Starting. Read: Chapter 1, Appendix B from textbook. Read: Chapter 1, Appendix B from textbook. Starting There are two ways to run your Python program using the interpreter 1 : from the command line or by using IDLE (which also comes with a text editor;

More information

The following content is provided under a Creative Commons license. Your support

The following content is provided under a Creative Commons license. Your support MITOCW Lecture 2 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 make a donation

More information

Exercise 6 - Addressing a Message

Exercise 6 - Addressing a Message Exercise 6 - Addressing a Message All e-mail messages have to include an address for an e-mail to be delivered, just as a normal letter has to have a house address. An e-mail address is made up of: a user

More information

VARIABLES. Aim Understanding how computer programs store values, and how they are accessed and used in computer programs.

VARIABLES. Aim Understanding how computer programs store values, and how they are accessed and used in computer programs. Lesson 2 VARIABLES Aim Understanding how computer programs store values, and how they are accessed and used in computer programs. WHAT ARE VARIABLES? When you input data (i.e. information) into a computer

More information

Arduino IDE Friday, 26 October 2018

Arduino IDE Friday, 26 October 2018 Arduino IDE Friday, 26 October 2018 12:38 PM Looking Under The Hood Of The Arduino IDE FIND THE ARDUINO IDE DOWNLOAD First, jump on the internet with your favorite browser, and navigate to www.arduino.cc.

More information

In further discussion, the books make other kinds of distinction between high level languages:

In further discussion, the books make other kinds of distinction between high level languages: Max and Programming This essay looks at Max from the point of view of someone with a bit of experience in traditional computer programming. There are several questions that come up from time to time on

More information

Clickteam Fusion 2.5 Creating a Debug System - Guide

Clickteam Fusion 2.5 Creating a Debug System - Guide INTRODUCTION In this guide, we will look at how to create your own 'debug' system in Fusion 2.5. Sometimes when you're developing and testing a game, you want to see some of the real-time values of certain

More information

Using Microsoft Excel

Using Microsoft Excel About Excel Using Microsoft Excel What is a Spreadsheet? Microsoft Excel is a program that s used for creating spreadsheets. So what is a spreadsheet? Before personal computers were common, spreadsheet

More information

Note: Please use the actual date you accessed this material in your citation.

Note: Please use the actual date you accessed this material in your citation. MIT OpenCourseWare http://ocw.mit.edu 18.06 Linear Algebra, Spring 2005 Please use the following citation format: Gilbert Strang, 18.06 Linear Algebra, Spring 2005. (Massachusetts Institute of Technology:

More information

PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between

PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between MITOCW Lecture 10A [MUSIC PLAYING] PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between all these high-level languages like Lisp and the query

More information

Chapter One: Getting Started With IBM SPSS for Windows

Chapter One: Getting Started With IBM SPSS for Windows Chapter One: Getting Started With IBM SPSS for Windows Using Windows The Windows start-up screen should look something like Figure 1-1. Several standard desktop icons will always appear on start up. Note

More information

1 of 5 5/11/2006 12:10 AM CS 61A Spring 2006 Midterm 2 solutions 1. Box and pointer. Note: Please draw actual boxes, as in the book and the lectures, not XX and X/ as in these ASCII-art solutions. Also,

More information

Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis. Copyright 2012 L. Leona Davis All Rights Reserved

Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis. Copyright 2012 L. Leona Davis All Rights Reserved Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis Copyright 2012 L. Leona Davis All Rights Reserved Cover Photo by Dmitry Maslov Cover Design by L. Leona Davis Smashwords Edition June

More information

3. Simple Types, Variables, and Constants

3. Simple Types, Variables, and Constants 3. Simple Types, Variables, and Constants This section of the lectures will look at simple containers in which you can storing single values in the programming language C++. You might find it interesting

More information

These are notes for the third lecture; if statements and loops.

These are notes for the third lecture; if statements and loops. These are notes for the third lecture; if statements and loops. 1 Yeah, this is going to be the second slide in a lot of lectures. 2 - Dominant language for desktop application development - Most modern

More information

What's the Slope of a Line?

What's the Slope of a Line? What's the Slope of a Line? These lines look pretty different, don't they? Lines are used to keep track of lots of info -- like how much money a company makes. Just off the top of your head, which of the

More information

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Slide 1: Cover Welcome to lesson 3 of the db2 on Campus lecture series. Today we're going to talk about tools and scripting, and this is part 1 of 2

More information

Slide 1 CS 170 Java Programming 1 Testing Karel

Slide 1 CS 170 Java Programming 1 Testing Karel CS 170 Java Programming 1 Testing Karel Introducing Unit Tests to Karel's World Slide 1 CS 170 Java Programming 1 Testing Karel Hi Everybody. This is the CS 170, Java Programming 1 lecture, Testing Karel.

More information

FILE ORGANIZATION. GETTING STARTED PAGE 02 Prerequisites What You Will Learn

FILE ORGANIZATION. GETTING STARTED PAGE 02 Prerequisites What You Will Learn FILE ORGANIZATION GETTING STARTED PAGE 02 Prerequisites What You Will Learn PRINCIPLES OF FILE ORGANIZATION PAGE 03 Organization Trees Creating Categories FILES AND FOLDERS PAGE 05 Creating Folders Saving

More information

COSC 2P91. Bringing it all together... Week 4b. Brock University. Brock University (Week 4b) Bringing it all together... 1 / 22

COSC 2P91. Bringing it all together... Week 4b. Brock University. Brock University (Week 4b) Bringing it all together... 1 / 22 COSC 2P91 Bringing it all together... Week 4b Brock University Brock University (Week 4b) Bringing it all together... 1 / 22 A note on practicality and program design... Writing a single, monolithic source

More information

Wednesday. Wednesday, September 17, CS 1251 Page 1

Wednesday. Wednesday, September 17, CS 1251 Page 1 CS 1251 Page 1 Wednesday Wednesday, September 17, 2014 8:20 AM Here's another good JavaScript practice site This site approaches things from yet another point of view it will be awhile before we cover

More information

Max and Programming Is Max a Programming Language?

Max and Programming Is Max a Programming Language? There are several questions that come up from time to time on the Max discussion list. Is Max a real programming language? if so how do I do [loop, switch, bitmap, recursion] and other programming tricks

More information

Comp 11 Lectures. Mike Shah. June 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures June 26, / 57

Comp 11 Lectures. Mike Shah. June 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures June 26, / 57 Comp 11 Lectures Mike Shah Tufts University June 26, 2017 Mike Shah (Tufts University) Comp 11 Lectures June 26, 2017 1 / 57 Please do not distribute or host these slides without prior permission. Mike

More information

A lot of people make repeated mistakes of not calling their functions and getting errors. Make sure you're calling your functions.

A lot of people make repeated mistakes of not calling their functions and getting errors. Make sure you're calling your functions. Handout 2 Functions, Lists, For Loops and Tuples [ ] Functions -- parameters/arguments, "calling" functions, return values, etc. Please make sure you understand this example: def square(x): return x *

More information

Python Activity 2: Input and Variables in Python

Python Activity 2: Input and Variables in Python Python Activity 2: Input and Variables in Python "How do you input and store data in a Python program?" Learning Objectives Students will be able to: Content: Explain how to input data in Python Explain

More information

1007 Imperative Programming Part II

1007 Imperative Programming Part II Agenda 1007 Imperative Programming Part II We ve seen the basic ideas of sequence, iteration and selection. Now let s look at what else we need to start writing useful programs. Details now start to be

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

Introduction to Unix

Introduction to Unix Part 2: Looking into a file Introduction to Unix Now we want to see how the files are structured. Let's look into one. more $ more fe_03_06596.txt 0.59 1.92 A-f: hello 1.96 2.97 B-m: (( hello )) 2.95 3.98

More information

Direct Variations DIRECT AND INVERSE VARIATIONS 19. Name

Direct Variations DIRECT AND INVERSE VARIATIONS 19. Name DIRECT AND INVERSE VARIATIONS 19 Direct Variations Name Of the many relationships that two variables can have, one category is called a direct variation. Use the description and example of direct variation

More information

AHHHHHHH!!!! NOT TESTING! Anything but testing! Beat me, whip me, send me to Detroit, but don t make me write tests!

AHHHHHHH!!!! NOT TESTING! Anything but testing! Beat me, whip me, send me to Detroit, but don t make me write tests! NAME DESCRIPTION Test::Tutorial - A tutorial about writing really basic tests AHHHHHHH!!!! NOT TESTING! Anything but testing! Beat me, whip me, send me to Detroit, but don t make me write tests! *sob*

More information

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 [talking head] This lecture we study theory design and implementation. Programmers have two roles to play here. In one role, they

More information

How to import text files to Microsoft Excel 2016:

How to import text files to Microsoft Excel 2016: How to import text files to Microsoft Excel 2016: You would use these directions if you get a delimited text file from a government agency (or some other source). This might be tab-delimited, comma-delimited

More information

Introduction to Unix

Introduction to Unix Introduction to Unix Part 1: Navigating directories First we download the directory called "Fisher" from Carmen. This directory contains a sample from the Fisher corpus. The Fisher corpus is a collection

More information

CS3 Midterm 1 Fall 2006

CS3 Midterm 1 Fall 2006 Overall, you did good job on this exam. CS3 Midterm 1 Fall 2006 Standards and Solutions 20 10 0 8.0 30.0 28.0 26.0 24.0 22.0 20.0 18.0 16.0 14.0 12.0 10.0 Std. Dev = 5.34 Mean = 21.6 N = 133.00 MT1_SCL

More information

CS125 : Introduction to Computer Science. Lecture Notes #4 Type Checking, Input/Output, and Programming Style

CS125 : Introduction to Computer Science. Lecture Notes #4 Type Checking, Input/Output, and Programming Style CS125 : Introduction to Computer Science Lecture Notes #4 Type Checking, Input/Output, and Programming Style c 2005, 2004, 2002, 2001, 2000 Jason Zych 1 Lecture 4 : Type Checking, Input/Output, and Programming

More information

Binary, Hexadecimal and Octal number system

Binary, Hexadecimal and Octal number system Binary, Hexadecimal and Octal number system Binary, hexadecimal, and octal refer to different number systems. The one that we typically use is called decimal. These number systems refer to the number of

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

Tutorial: Bryce Instancing Without the Instancing Lab

Tutorial: Bryce Instancing Without the Instancing Lab http://www.daz3d.com/forums/discussion/67986/tutorial-bryce-instancing-without-the-instancing-lab Fencepost52, 23. December 2015. Note: Use the zoom option in your PDF viewer to enlarge the pictures if

More information

KMyMoney Transaction Matcher

KMyMoney Transaction Matcher KMyMoney Transaction Matcher Ace Jones Use Cases Case #1A: Matching hand-entered transactions manually I enter a transaction by hand, with payee, amount, date & category. I download

More information

MITOCW watch?v=rvrkt-jxvko

MITOCW watch?v=rvrkt-jxvko MITOCW watch?v=rvrkt-jxvko 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

Staff Intranet Survey Results

Staff Intranet Survey Results Staff Intranet Survey Results Responses collected from 1/26/16-2/1/16 1. Of the 90 responses: 74 use intranet.lib.unc.edu most often 16 use hsl-intranet.lib.unc.edu most often 2. What are the top 5 things

More information

Neon Carrot Prototype I Evaluation. Dan Cody, Logan Dethrow, Ben Fisher, Jeff Stanton April 6, Preamble

Neon Carrot Prototype I Evaluation. Dan Cody, Logan Dethrow, Ben Fisher, Jeff Stanton April 6, Preamble Neon Carrot Prototype I Evaluation Dan Cody, Logan Dethrow, Ben Fisher, Jeff Stanton April 6, 2009 Preamble Overall, we were impressed with the prototype's visual style, although some interface elements

More information

From time to time Google changes the way it does things, and old tutorials may not apply to some new procedures.

From time to time Google changes the way it does things, and old tutorials may not apply to some new procedures. From time to time Google changes the way it does things, and old tutorials may not apply to some new procedures. This is another tutorial which, in about 6 months, will probably be irrelevant. But until

More information

MITOCW watch?v=sdw8_0rdzuw

MITOCW watch?v=sdw8_0rdzuw MITOCW watch?v=sdw8_0rdzuw PROFESSOR: Directed acyclic graphs are a special class of graphs that really have and warrant a theory of their own. Of course, "directed acyclic graphs" is lot of syllables,

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #34. Function with pointer Argument

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #34. Function with pointer Argument Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #34 Function with pointer Argument (Refer Slide Time: 00:05) So, here is the stuff that we have seen about pointers.

More information

Note: Photoshop tutorial is spread over two pages. Click on 2 (top or bottom) to go to the second page.

Note: Photoshop tutorial is spread over two pages. Click on 2 (top or bottom) to go to the second page. Introduction During the course of this Photoshop tutorial we're going through 9 major steps to create a glass ball. The main goal of this tutorial is that you get an idea how to approach this. It's not

More information

Karlen Communications Accessible Word Document Design: Images and Alt Text. Karen McCall, M.Ed.

Karlen Communications Accessible Word Document Design: Images and Alt Text. Karen McCall, M.Ed. Karlen Communications Accessible Word Document Design: Images and Alt Text Karen McCall, M.Ed. Table of Contents Introduction... 3 Creating Pictures with Print Screen... 4 Creating Pictures with Snipping

More information

Definition: A data structure is a way of organizing data in a computer so that it can be used efficiently.

Definition: A data structure is a way of organizing data in a computer so that it can be used efficiently. The Science of Computing I Lesson 4: Introduction to Data Structures Living with Cyber Pillar: Data Structures The need for data structures The algorithms we design to solve problems rarely do so without

More information

Spectroscopic Analysis: Peak Detector

Spectroscopic Analysis: Peak Detector Electronics and Instrumentation Laboratory Sacramento State Physics Department Spectroscopic Analysis: Peak Detector Purpose: The purpose of this experiment is a common sort of experiment in spectroscopy.

More information

Math 25 and Maple 3 + 4;

Math 25 and Maple 3 + 4; Math 25 and Maple This is a brief document describing how Maple can help you avoid some of the more tedious tasks involved in your Math 25 homework. It is by no means a comprehensive introduction to using

More information

Discussion 1H Notes (Week 2, 4/8) TA: Brian Choi Section Webpage:

Discussion 1H Notes (Week 2, 4/8) TA: Brian Choi Section Webpage: Discussion 1H Notes (Week 2, 4/8) TA: Brian Choi (schoi@cs.ucla.edu) Section Webpage: http://www.cs.ucla.edu/~schoi/cs31 Variables You have to instruct your computer every little thing it needs to do even

More information

CPSC 320 Sample Solution, Playing with Graphs!

CPSC 320 Sample Solution, Playing with Graphs! CPSC 320 Sample Solution, Playing with Graphs! September 23, 2017 Today we practice reasoning about graphs by playing with two new terms. These terms/concepts are useful in themselves but not tremendously

More information

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)...

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)... Remembering numbers (and other stuff)... Let s talk about one of the most important things in any programming language. It s called a variable. Don t let the name scare you. What it does is really simple.

More information

PowerPoint Instructions

PowerPoint Instructions PowerPoint Instructions Exercise 1: Type and Format Text and Fix a List 1. Open the PowerPoint Practice file. To add a company name to slide 1, click the slide 1 thumbnail if it's not selected. On the

More information

Program Organization and Comments

Program Organization and Comments C / C++ PROGRAMMING Program Organization and Comments Copyright 2013 Dan McElroy Programming Organization The layout of a program should be fairly straight forward and simple. Although it may just look

More information

The following content is provided under a Creative Commons license. Your support

The following content is provided under a Creative Commons license. Your support MITOCW Recitation 2 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 make

More information

Matlab for FMRI Module 1: the basics Instructor: Luis Hernandez-Garcia

Matlab for FMRI Module 1: the basics Instructor: Luis Hernandez-Garcia Matlab for FMRI Module 1: the basics Instructor: Luis Hernandez-Garcia The goal for this tutorial is to make sure that you understand a few key concepts related to programming, and that you know the basics

More information

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit.

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit. Com S 227 Fall 2017 Miniassignment 1 50 points Due Date: Monday, October 16, 11:59 pm (midnight) Late deadline (25% penalty): Tuesday, October 17, 11:59 pm General information This assignment is to be

More information

Installing and Configuring the Voice UPB Bridge updated 1-Jan-2019

Installing and Configuring the Voice UPB Bridge updated 1-Jan-2019 Installing and Configuring the Voice UPB Bridge updated 1-Jan-2019 Before starting these instructions, you should already have your Voice assistant installed and working. These instructions can be used

More information

BBC Learning English Face up to Phrasals Mark's Mistake

BBC Learning English Face up to Phrasals Mark's  Mistake BBC Learning English Face up to Phrasals Mark's Email Mistake Episode 1: Email Fun? Mark: Hey Ali, did you check out that email I sent you the one about stupid Peter, saying how stupid he is? Oh dear.

More information

But I know what most of you will do: use a calculator to convert; that's fine, IF you understand the theory.

But I know what most of you will do: use a calculator to convert; that's fine, IF you understand the theory. Numbers After you have read this, the next section will show how to use a This and other videos related to numbers and colors are available on the class web site. Why are there different numbering systems?

More information

Helping the Compiler Help You. Thomas Dy

Helping the Compiler Help You. Thomas Dy Helping the Compiler Help You Thomas Dy Programming do { programmer.write_code(); if(lazy) { sleep(); } compile_code(); } while(compiler.has_errors()); Compiler: Me no speaky English Programmer: Compiler,

More information

Introduction to Python Code Quality

Introduction to Python Code Quality Introduction to Python Code Quality Clarity and readability are important (easter egg: type import this at the Python prompt), as well as extensibility, meaning code that can be easily enhanced and extended.

More information