Spring CS Homework 3 p. 1. CS Homework 3

Size: px
Start display at page:

Download "Spring CS Homework 3 p. 1. CS Homework 3"

Transcription

1 Spring CS Homework 3 p. 1 Deadline 11:59 pm on Friday, February 9, 2018 Purpose CS Homework 3 To try out another testing function, check-within, to get more practice using the design recipe to write and test functions, and to use at least one of those functions as an argument in a big-bang clause to create an animation. How to submit You will submit your 111hw3.rkt file for Homework 3 on the course Canvas site. Each time you would like to submit your work so far: Save your current DrRacket Definitions window contents in a file with the name 111hw3.rkt Note: please use that exact name -- do not change the case, add blanks, etc. If I search for a file with that name in your submission, I want it to show up! Open a web page to connect to Click on the icon for the CS 111 course, then choose the Homework 3 link (in the Homeworks section). Follow the Canvas instructions for uploading your Racket file 111hw3.rkt. Important notes NOTE: it is usually fine and often encouraged if you would like to write one or more helper functions to help you write a homework problem's required functions. HOWEVER -- whenever you do so, EACH function you define IS EXPECTED TO follow ALL of the design recipe steps: after thinking about the function and the kind of data involved, write its signature, then its purpose statement, then its function header, then its tests/check- expressions, then replace its... body with an appropriate expression. NOTE: it is also fine and encouraged to define and use named constants when you notice there is some "set" value you are reusing! You only need to write new signature and purpose statement comments for functions that you are designing and writing yourself you do not write them for named constants, plain compound expressions. or for functions that are already built into the Racket environment or the teachpacks. That said, if you copy one of the in-class functions for use in your homework, DO also copy its signature, purpose, and check- expressions/tests as well as the function definition. Remember: A signature in Racket is written as a comment, and it includes the name of the function, the Racket data types of expressions it expects in the order they're to be expected, and the Racket data type of the expression it produces. This should be written as discussed in class (and you can find examples in the posted in-class examples). For example, signature: triple: number -> number signature: say-bye: string -> string

2 Spring CS Homework 3 p. 2 signature: avg-trio: number number number -> number signature: purple-star: number -> image Remember: a purpose statement in Racket is written as a comment, and it describes what the function expects and describes what the function produces (and if the function has side-effects, it also describes those side-effects). For example, purpose: expects a number, and produces triple that number purpose: expects a name, and produces the string containing "Goodbye, " followed by their name purpose: expects three numbers, and produces the average of those three numbers purpose: expects a size in pixels (which is the distance between points of a 5-pointed-star), and produces an image of a solid purple star of that size Remember: it is a COURSE STYLE STANDARD that named constants are to be descriptive and written in all-uppercase -- for example, (define WIDTH 300) it is ANOTHER course style standard that parameters and function names are to be descriptive and written in all-lowercase -- for example, (define (triple num)...) You should use blank lines to separate your answers for the different parts of the homework problems. If you would like to add comments noting which part each answer is for, that is fine, too! The design recipe is important! You will receive substantial credit for the signature, purpose, header, and examples/check-expects portions of your functions. Typically you'll get at least half-credit for a correct signature, purpose, header, and examples/check-expects, even if your function body is not correct (and, you'll typically lose at least half-credit if you omit these or do them poorly, even if your function body is correct). Homework File Setup Open a new Racket Definitions file (it's a good idea to immediately save your file as 111hw3.rkt, in the folder where you want your Racket file to go, and save often as you go!) and type in comments at the beginning of the file, containing: a comment-line containing your name, followed by a comment-line containing CS HW 3, followed by a comment-line giving the date you last modified this homework -- for example: type in YOUR name CS HW 3 last modified: Then put a blank line, and then: (require 2htdp/image) (require 2htdp/universe)

3 Spring CS Homework 3 p. 3 Problem 1 Problem 1 In this problem, we will introduce a variation on the check-expect expression. You are not writing a function definition in this problem -- you are writing check-within expressions. Sometimes, when a function returns a number that's not an integer, especially a number such as the result of (/ 1 3), it becomes difficult to write an exact expected value in a check-expect expression after all, 1/3 is an infinite decimal, and won't exactly match that. It would be better in this case to have the expected value be "close enough" to the actual value. That is why, along with several additional check- functions, Racket also has the built-in check-within function, so we can check to see if the expected answer and the calculated answer are "close enough" to sufficiently test our functions. The check-within function expects three arguments: the expression being tested, which in check-within's case should be of type number an approximate expected value for that expression being tested a number that represents the largest that the difference between the expression and the expected value can be and still consider this to be a passing test. (In math, this maximum difference is also called a delta.) As an example, let's test whether Racket's built-in constant pi is within of our usual estimate of pi, the check-within expression would look like this: (check-within pi expression being tested APPROXIMATE expected value.001) how close these must be to be "close enough" (Yes, pi is a Racket named constant but it's not a named constant we defined, so it's not written in upper case characters. We write our self-defined constants in upper case characters!) If you want to know if the pre-defined value of pi is within of , the next checkwithin expression can do this. It will fail, because our estimate is not close enough: (check-within pi ) This problem will have you practice writing a few expressions using check-within. 1 part a Write a check-within expression that results in a passing test for testing what the expression (/ 1 6)...should be approximately equal to. Use an estimate that's within 0.01 of the actual value. 1 part b Write a check-within expression that will result in a passing test for testing what the expression (* pi 1000)...should be approximately equal to.

4 Spring CS Homework 3 p. 4 Problem 2 Problem 2 The Celsius temperature scale, used by most of the rest of the world, is different from the Fahrenheit temperature scale used in the US. Design a function that expects a temperature given in Celsius, and returns the equivalent Fahrenheit temperature. Write such a function cels->fahr, using the following design recipe steps: (It is reasonable to search the web or an appropriate reference for the conversion formula for this -- consider that part of the first step of the Design Recipe, the part where you analyze the problem.) 2 part a Write an appropriate signature comment for this function. 2 part b Write an appropriate purpose statement comment for this function. 2 part c START the define expression for this function, including an appropriate function header including appropriate parameter identifier(s) of your choosing, and typing in... for the function body for NOW. 2 part d Write at least 2 specific tests/check-expect or check-within expressions for this function, placed either before or after your not-yet-completed function definition, whichever you prefer. (Something just to think about: Do you see why check-within might be useful for tests for this function, depending on what values you choose for this function's tests?) 2 part e Only NOW should you replace the... in the function's body with an appropriate expression to complete this function. Run and test your function until you are satisfied that it passes its tests and works correctly. Finally, write at least 2 expressions of your choice that run your function (so that you will see their results) after your function definition. Problem 3 Problem 3 I decide I'd like a function name-badge that expects a desired name and a desired background color, and returns an image of a "name badge" for that name with that background color and with that name displayed in its middle using black letters. YOU get to decide on the shape of this badge image (the user does not specify it, you will choose it as part of designing this function.) YOU also get to decide on the font-size you want to use for the given name's letters

5 Spring CS Homework 3 p. 5 on your resulting badge. (It would be good to make your chosen font size a named constant!) Somehow make the width of your "badge" be based on the given name's length. (HINT: reminder: string-length expects a string and returns how many characters are in that string.) 3 part a Write an appropriate signature comment for this function. 3 part b Write an appropriate purpose statement comment for this function. 3 part c START the define expression for this function, including an appropriate function header including appropriate parameter identifier(s) of your choosing, and typing in... for the function body for NOW. 3 part d Write at least 2 specific tests/check-expect expressions for this function, placed either before or after your not-yet-completed function definition, whichever you prefer. 3 part e Only NOW should you replace the... in the function's body with an appropriate expression to complete this function. Run and test your function until you are satisfied that it passes its tests and works correctly. Finally, write at least 2 expressions of your choice that run your function (so that you will see their results) after your function definition. Problem 4 Problem 4 FUN FACT: BSL Racket includes a make-color function. make-color expects three arguments, each an integer number in [0, 255], representing its red, green, and blue values, respectively, and returns a color (actually a new data type!) made up of those red, green, and blue values. Optionally, it can take a 4th argument, another integer in [0, 255], giving the transparency of that color (0 is completely transparent, 255 is completely opaque). But - to play with this is a little inconvenient, because to "see" what the returned color looks like, you have to use the resulting color in some image function. For example, you can run: (make-color )...but it doesn't return what the color looks like it returns (make-color ). But, you can see the resulting color if you run something like: (circle 30 "solid" (make-color )) Design a function color-swatch that expects desired red, green, and blue values, and returns a solid square or rectangular image (your choice) whose color has those red, green, and blue values. (You can pick a

6 Spring CS Homework 3 p. 6 reasonable constant size for this square or rectangular.) OPTIONAL: if you'd like, you can design the function to also expect a transparency value (that is, you can design it to expect 4 arguments instead of 3 arguments). No extra credit, it's just something you can try. If you choose to do so, you should make sure your signature reflects this and purpose statement explains this! 4 part a Write an appropriate signature comment for this function. 4 part b Write an appropriate purpose statement comment for this function. 4 part c START the define expression for this function, including an appropriate function header including appropriate parameter identifier(s) of your choosing, and typing in... for the function body for NOW. 4 part d Write at least 2 specific tests/check-expect expressions for this function, placed either before or after your not-yet-completed function definition, whichever you prefer. 4 part e Only NOW should you replace the... in the function's body with an appropriate expression to complete this function. Run and test your function until you are satisfied that it passes its tests and works correctly. Finally, write at least 2 expressions of your choice that run your function (so that you will see their results) after your function definition. Problem 5 Problem 5 5 part a You are going to be creating some scenes in later parts of this problem, so for this part, define the following named constants: define a named constant WIDTH, a scene width of your choice (but not bigger than 600 pixels). define a named constant HEIGHT, a scene height of your choice (but not bigger than 400 pixels). define a named constant BACKDROP, an unchanging, constant scene that will serve as a backdrop scene in some expressions. its size should be WIDTH by HEIGHT pixels it should include at least one placed image of your choice (and you may certainly include additional placed images if you wish). (you may certainly include additional named constants, also, if you wish!)

7 Spring CS Homework 3 p. 7 5 part b Consider a "world" of type number -- starting from a given initial number, in which that number changes as a ticker ticks, and in which the number determines what is shown where (and/or how) in a scene. For this world, big-bang's to-draw clause will need a scene-drawing function that expects a number, and produces a scene based on that number. Don't get too far ahead of yourself, here! Just decide what image (or images) will be ADDED to your BACKDROP scene from 5 part a based on a number value. Do something that is at least slightly different than the posted class examples, and at least slightly different than what you did for the Week 3 Lab Exercise. For example: an image could be placed in the BACKDROP whose size depends on that number, or an image's horizontal coordinate within the BACKDROP could be determined by that number, or an image's vertical coordinate within the BACKDROP could be determined by that number, or since you now know about make-color, part an image's color or transparency could be determined by that number, or you could change more than one of these at the same time -- ask long as the changes are all based on a single number, the possibilities are endless! You will design a draw-scene function that expects the current world number and produces a scene placing an image (or multiple images) into your BACKDROP whose location within the scene, or size, or color, or some combination of these things, is somehow based on that world number. Write an appropriate signature comment for this function. 5 part c Write an appropriate purpose statement comment for this function. 5 part d START the define expression for this function, including an appropriate function header including appropriate parameter identifier of your choosing, and typing in... for the function body for NOW. 5 part e Write at least 2 specific tests/check-expect expressions for this function, placed either before or after your not-yet-completed function definition, whichever you prefer. 5 part f Only NOW should you replace the... in the function's body with an appropriate expression to complete this function. For full credit, make sure that you use your BACKDROP scene from 5 part a appropriately within this expression. Run and test your function until you are satisfied that it passes its tests and works correctly. Also write at least 2 expressions of your choice that run your function (so that you will see their results) after your function definition. 5 part g What change do you want to happen to your world number as the world ticker ticks? Will it increase by 1?

8 Spring CS Homework 3 p. 8 decrease by 1? Increase and/or decrease by other amounts? Decide how your world number will change on each ticker tick. If your change can be done by a built-in function such as add1 or sub1, that is fine. Otherwise, using the design recipe, develop this function, that expects a number and produces a number. (if you develop your own function here, REMEMBER to do all the steps you have been doing for the other functions in this homework -- first write its signature, then its purpose statement, then its function header, then its tests/check-expect expressions, then replace its... body with an appropriate expression) Now you can write a big-bang expression consisting of an initial world number value, a to-draw clause with your draw-scene function, and an on-tick clause with the name of your (new or existing) numberchanging function -- something like: (big-bang initial-number-you-choose (to-draw draw-scene) (on-tick name-of-your-number-changing-function)) Now you should see something changing in your scene, and now you are done with this problem. NOTE: you can also change the speed of the ticker in the on-tick clause if you would like by giving on-tick an optional second expression: a number that gives the number of seconds per tick. The default value is (/ 1 28) or 1/28 of a second, which means it ticks 28 times per second. To go slower, put a number greater than To go faster, put a number less than (but greater than 0). Example: (on-tick add1 0.2) this will move slowly, only 5 ticks per second

CS Homework 2 p. 1. CS Homework 2

CS Homework 2 p. 1. CS Homework 2 CS 111 - Homework 2 p. 1 Deadline 11:59 pm on Friday, February 2, 2018 Purpose CS 111 - Homework 2 To practice defining and using named constants and check-expect expressions, and to practice using the

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

Spring CS Homework 7 p. 1. CS Homework 7

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

More information

Homework 11 Program Setup (with some IMPORTANT NEW STEPS!)

Homework 11 Program Setup (with some IMPORTANT NEW STEPS!) Spring 2018 - CS 111 - Homework 11 p. 1 Deadline 11:59 pm on Friday, April 27, 2018 Purpose To practice with loops, arrays, and more! How to submit CS 111 - Homework 11 Submit your main.cpp (or it may

More information

CS Homework 11 p. 1. CS Homework 11

CS Homework 11 p. 1. CS Homework 11 CS 111 - Homework 11 p. 1 Deadline 11:59 pm on Monday, May 2, 2016 How to submit Each time you would like to submit your work: CS 111 - Homework 11 If your files are not already on nrs-labs, be sure to

More information

CS Fall Homework 11 p. 1. CS Homework 11

CS Fall Homework 11 p. 1. CS Homework 11 CS 111 - Fall 2018 - Homework 11 p. 1 Deadline 11:59 pm on MONDAY, December 3, 2018 Purpose To practice with loops, arrays, and more! How to submit Submit your THREE.cpp FILES: CS 111 - Homework 11 hw11.cpp

More information

CS Homework 10 p. 1. CS Homework 10

CS Homework 10 p. 1. CS Homework 10 CS 111 - Homework 10 p. 1 Deadline 11:59 pm on Friday, December 2, 2016 How to submit Each time you would like to submit your work: CS 111 - Homework 10 If your files are not already on nrs-labs, be sure

More information

GOALS [HTDP/2e Chapters 1 through 3.5]

GOALS [HTDP/2e Chapters 1 through 3.5] Lab 1 GOALS [HTDP/2e Chapters 1 through 3.5] This week's lab will help you to practice: Using Dr.Racket: Interactions vs. Definitions; Stepper; Error messages; Indentation Simple image functions; using

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

Spring CS Homework 12 p. 1. CS Homework 12

Spring CS Homework 12 p. 1. CS Homework 12 Spring 2018 - CS 111 - Homework 12 p. 1 Deadline 11:59 pm on Friday, May 4, 2018 Purpose CS 111 - Homework 12 To practice with sentinel- and question-controlled loops, file input and file output, and writing

More information

Deadline. Purpose. How to submit. Important notes. CS Homework 9. CS Homework 9 p :59 pm on Friday, April 7, 2017

Deadline. Purpose. How to submit. Important notes. CS Homework 9. CS Homework 9 p :59 pm on Friday, April 7, 2017 CS 111 - Homework 9 p. 1 Deadline 11:59 pm on Friday, April 7, 2017 Purpose CS 111 - Homework 9 To give you an excuse to look at some newly-posted C++ templates that you might find to be useful, and to

More information

CS Homework 11 p. 1. CS Homework 11

CS Homework 11 p. 1. CS Homework 11 CS 111 - Homework 11 p. 1 Deadline 11:59 pm on Friday, December 12, 2014 How to submit Each time you would like to submit your work: CS 111 - Homework 11 IF they are not already on nrs-labs, then transfer/save

More information

Homework: Simple functions and conditionals

Homework: Simple functions and conditionals Homework: Simple functions and conditionals COMP 50 Fall 2013 This homework is due at 11:59PM on Monday, September 16. If all goes well, you will download an extension to DrRacket that enables you to submit

More information

CS 051 Homework Laboratory #2

CS 051 Homework Laboratory #2 CS 051 Homework Laboratory #2 Dirty Laundry Objective: To gain experience using conditionals. The Scenario. One thing many students have to figure out for the first time when they come to college is how

More information

The purpose of this lesson is to familiarize you with the basics of Racket (a dialect of Scheme). You will learn about

The purpose of this lesson is to familiarize you with the basics of Racket (a dialect of Scheme). You will learn about Lesson 0.4 Introduction to Racket Preliminaries The purpose of this lesson is to familiarize you with the basics of Racket (a dialect of Scheme). You will learn about Expressions Numbers, Booleans, and

More information

CS Homework 10 p. 1. CS Homework 10

CS Homework 10 p. 1. CS Homework 10 CS 131 - Homework 10 p. 1 Deadline: 5:00 pm on Friday, December 3 How to submit: CS 131 - Homework 10 When you are done with the following problems: make sure that your current working directory on nrs-labs

More information

Do a domain analysis by hand-drawing three or more pictures of what the world program will look like at different stages when it is running.

Do a domain analysis by hand-drawing three or more pictures of what the world program will look like at different stages when it is running. How to Design Worlds The How to Design Worlds process provides guidance for designing interactive world programs using big-bang. While some elements of the process are tailored to big-bang, the process

More information

Paint Tutorial (Project #14a)

Paint Tutorial (Project #14a) Paint Tutorial (Project #14a) In order to learn all there is to know about this drawing program, go through the Microsoft Tutorial (below). (Do not save this to your folder.) Practice using the different

More information

Animations that make decisions

Animations that make decisions Chapter 17 Animations that make decisions 17.1 String decisions Worked Exercise 17.1.1 Develop an animation of a simple traffic light. It should initially show a green disk; after 5 seconds, it should

More information

CISC 1600, Lab 3.1: Processing

CISC 1600, Lab 3.1: Processing CISC 1600, Lab 3.1: Processing Prof Michael Mandel 1 Getting set up For this lab, we will be using OpenProcessing, a site for building processing sketches online using processing.js. 1.1. Go to https://www.openprocessing.org/class/57767/

More information

Digital Media. Seasons Assignment. 1. Copy and open the file seasonsbegin.fla from the Read folder.

Digital Media. Seasons Assignment. 1. Copy and open the file seasonsbegin.fla from the Read folder. Digital Media Seasons Assignment 1. Copy and open the file seasonsbegin.fla from the Read folder. 2. Make a new layer for buttons. Create a button that the user will click to start the interaction. (Be

More information

CS 100 Spring Lecture Notes 3/8/05 Review for Exam 2

CS 100 Spring Lecture Notes 3/8/05 Review for Exam 2 CS 100 Spring 2005 Lecture Notes 3/8/05 Review for Exam 2 The second exam is Thursday, March 10. It will cover topics from Homework 2 through Homework 4, including anything pertaining to binary representation.

More information

15-110: Principles of Computing, Spring 2018

15-110: Principles of Computing, Spring 2018 15-110: Principles of Computing, Spring 2018 Problem Set 5 (PS5) Due: Friday, February 23 by 2:30PM via Gradescope Hand-in HANDIN INSTRUCTIONS Download a copy of this PDF file. You have two ways to fill

More information

COM110: Lab 2 Numeric expressions, strings, and some file processing (chapters 3 and 5)

COM110: Lab 2 Numeric expressions, strings, and some file processing (chapters 3 and 5) COM110: Lab 2 Numeric expressions, strings, and some file processing (chapters 3 and 5) 1) Practice submitting programming assignment 1. Take a few arbitrary modules (.py files) that you have written and

More information

1 Getting started with Processing

1 Getting started with Processing cis3.5, spring 2009, lab II.1 / prof sklar. 1 Getting started with Processing Processing is a sketch programming tool designed for use by non-technical people (e.g., artists, designers, musicians). For

More information

CS 463 Project 1 Imperative/OOP Fractals

CS 463 Project 1 Imperative/OOP Fractals CS 463 Project 1 Imperative/OOP Fractals The goal of a couple of our projects is to compare a simple project across different programming paradigms. This semester, we will calculate the Mandelbrot Set

More information

Using Inheritance to Share Implementations

Using Inheritance to Share Implementations Using Inheritance to Share Implementations CS 5010 Program Design Paradigms "Bootcamp" Lesson 11.2 Mitchell Wand, 2012-2015 This work is licensed under a Creative Commons Attribution-NonCommercial 4.0

More information

TSM Report Designer. Even Microsoft Excel s Data Import add-in can be used to extract TSM information into an Excel spread sheet for reporting.

TSM Report Designer. Even Microsoft Excel s Data Import add-in can be used to extract TSM information into an Excel spread sheet for reporting. TSM Report Designer The TSM Report Designer is used to create and modify your TSM reports. Each report in TSM prints data found in the databases assigned to that report. TSM opens these databases according

More information

CISC 1600, Lab 2.1: Processing

CISC 1600, Lab 2.1: Processing CISC 1600, Lab 2.1: Processing Prof Michael Mandel 1 Getting set up For this lab, we will be using Sketchpad, a site for building processing sketches online using processing.js. 1.1. Go to http://cisc1600.sketchpad.cc

More information

On the Web sun.com/aboutsun/comm_invest STAROFFICE 8 DRAW

On the Web sun.com/aboutsun/comm_invest STAROFFICE 8 DRAW STAROFFICE 8 DRAW Graphics They say a picture is worth a thousand words. Pictures are often used along with our words for good reason. They help communicate our thoughts. They give extra information that

More information

Assignment 3 Functions, Graphics, and Decomposition

Assignment 3 Functions, Graphics, and Decomposition Eric Roberts Handout #19 CS106A October 8, 1999 Assignment 3 Functions, Graphics, and Decomposition Due: Friday, October 15 [In] making a quilt, you have to choose your combination carefully. The right

More information

Chapter 2. The Midpoint Formula:

Chapter 2. The Midpoint Formula: Chapter 2 The Midpoint Formula: Sometimes you need to find the point that is exactly between two other points. For instance, you might need to find a line that bisects (divides into equal halves) a given

More information

Skill 1: Multiplying Polynomials

Skill 1: Multiplying Polynomials CS103 Spring 2018 Mathematical Prerequisites Although CS103 is primarily a math class, this course does not require any higher math as a prerequisite. The most advanced level of mathematics you'll need

More information

Com S 127 Lab 2. For the first two parts of the lab, start up Wing 101 and use the Python shell window to try everything out.

Com S 127 Lab 2. For the first two parts of the lab, start up Wing 101 and use the Python shell window to try everything out. Com S 127 Lab 2 Checkpoint 0 Please open the CS 127 Blackboard page and click on Groups in the menu at left. Sign up for the group corresponding to the lab section you are attending. Also, if you haven't

More information

Draw beautiful and intricate patterns with Python Turtle, while learning how to code with Python.

Draw beautiful and intricate patterns with Python Turtle, while learning how to code with Python. Raspberry Pi Learning Resources Turtle Snowflakes Draw beautiful and intricate patterns with Python Turtle, while learning how to code with Python. How to draw with Python Turtle 1. To begin, you will

More information

Watch the video below to learn more about number formats in Excel. *Video removed from printing pages. Why use number formats?

Watch the video below to learn more about number formats in Excel. *Video removed from printing pages. Why use number formats? Excel 2016 Understanding Number Formats What are number formats? Whenever you're working with a spreadsheet, it's a good idea to use appropriate number formats for your data. Number formats tell your spreadsheet

More information

Week 3: Objects, Input and Processing

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

More information

Homework 8: Matrices Due: 11:59 PM, Oct 30, 2018

Homework 8: Matrices Due: 11:59 PM, Oct 30, 2018 CS17 Integrated Introduction to Computer Science Klein Homework 8: Matrices Due: 11:59 PM, Oct 30, 2018 Contents 1 Reverse (Practice) 4 2 Main Diagonal (Practice) 5 3 Horizontal Flip 6 4 Vertical Flip

More information

Photoshop tutorial: Final Product in Photoshop:

Photoshop tutorial: Final Product in Photoshop: Disclaimer: There are many, many ways to approach web design. This tutorial is neither the most cutting-edge nor most efficient. Instead, this tutorial is set-up to show you as many functions in Photoshop

More information

Honors Computer Science Python Mr. Clausen Program 7A, 7B

Honors Computer Science Python Mr. Clausen Program 7A, 7B Honors Computer Science Python Mr. Clausen Program 7A, 7B PROGRAM 7A Turtle Graphics Animation (100 points) Here is the overview of the program. Use functions to draw a minimum of two background scenes.

More information

CS Homework 11

CS Homework 11 CS 328 - Homework 11 p. 1 Deadline CS 328 - Homework 11 Problem 4 (presenting something operational from Problem 3) is due during lab on Friday, April 29; the remainder of this homework is due by 11:59

More information

CS 134 Programming Exercise 2:

CS 134 Programming Exercise 2: CS 134 Programming Exercise 2: Dirty Laundry Objective: To gain experience using conditionals. The Scenario. One thing some students have to figure out for the first time when they come to college is how

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

In the first class, you'll learn how to create a simple single-view app, following a 3-step process:

In the first class, you'll learn how to create a simple single-view app, following a 3-step process: Class 1 In the first class, you'll learn how to create a simple single-view app, following a 3-step process: 1. Design the app's user interface (UI) in Xcode's storyboard. 2. Open the assistant editor,

More information

Programming Project 1

Programming Project 1 Programming Project 1 Handout 6 CSCI 134: Fall, 2016 Guidelines A programming project is a laboratory that you complete on your own, without the help of others. It is a form of take-home exam. You may

More information

Honors Computer Science C++ Mr. Clausen Program 6A, 6B, 6C, & 6G

Honors Computer Science C++ Mr. Clausen Program 6A, 6B, 6C, & 6G Honors Computer Science C++ Mr. Clausen Program 6A, 6B, 6C, & 6G Special Note: Every program from Chapter 4 to the end of the year needs to have functions! Program 6A: Celsius To Fahrenheit Or Visa Versa

More information

Unit 21 - Creating a Navigation Bar in Macromedia Fireworks

Unit 21 - Creating a Navigation Bar in Macromedia Fireworks Unit 21 - Creating a Navigation Bar in Macromedia Fireworks Items needed to complete the Navigation Bar: Unit 21 - House Style Unit 21 - Graphics Sketch Diagrams Document ------------------------------------------------------------------------------------------------

More information

1. Complete these exercises to practice creating user functions in small sketches.

1. Complete these exercises to practice creating user functions in small sketches. Lab 6 Due: Fri, Nov 4, 9 AM Consult the Standard Lab Instructions on LEARN for explanations of Lab Days ( D1, D2, D3 ), the Processing Language and IDE, and Saving and Submitting. Rules: Do not use the

More information

Lab 7: OCaml 12:00 PM, Oct 22, 2017

Lab 7: OCaml 12:00 PM, Oct 22, 2017 CS17 Integrated Introduction to Computer Science Hughes Lab 7: OCaml 12:00 PM, Oct 22, 2017 Contents 1 Getting Started in OCaml 1 2 Pervasives Library 2 3 OCaml Basics 3 3.1 OCaml Types........................................

More information

Adobe Photoshop How to Use the Marquee Selection Tools

Adobe Photoshop How to Use the Marquee Selection Tools Adobe Photoshop How to Use the Marquee Selection Tools In Photoshop there are various ways to make a selection and also various reasons why you'd want to make a selection. You may want to remove something

More information

Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 5/17/2012 Physics 120 Section: ####

Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 5/17/2012 Physics 120 Section: #### Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 Lab partners: Lab#1 Presentation of lab reports The first thing we do is to create page headers. In Word 2007 do the following:

More information

Copyright. For more information, please read the Disclosures and Disclaimers section at the end of this ebook. First PDF Edition, February 2013

Copyright. For more information, please read the Disclosures and Disclaimers section at the end of this ebook. First PDF Edition, February 2013 Copyright This ebook is Copyright 2013 Teresa Miller (the Author ). All Rights Reserved. Published in the United States of America. The legal notices, disclosures, and disclaimers in the front and back

More information

Curves & Splines. Assignment #3. Overview & Objectives. Due Dates. CPSC 453 Fall 2018 University of Calgary

Curves & Splines. Assignment #3. Overview & Objectives. Due Dates. CPSC 453 Fall 2018 University of Calgary Curves & Splines Assignment #3 CPSC 453 Fall 2018 University of Calgary Overview & Objectives The main objective of this third assignment in CPSC 453 is to learn to work with Bézier curves and splines.

More information

CS 170 Java Programming 1. Week 5: Procedures and Functions

CS 170 Java Programming 1. Week 5: Procedures and Functions CS 170 Java Programming 1 Week 5: Procedures and Functions What s the Plan? Topic 1: More on graphical objects Creating your own custom Turtle types Introducing media, pictures and sounds Topic 2: Decomposition:

More information

CMSC 201 Fall 2016 Homework 6 Functions

CMSC 201 Fall 2016 Homework 6 Functions CMSC 201 Fall 2016 Homework 6 Functions Assignment: Homework 6 Functions Due Date: Wednesday, October 26th, 2016 by 8:59:59 PM Value: 40 points Collaboration: For Homework 6, collaboration is not allowed

More information

1 Getting started with Processing

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

More information

Homework #2: Introduction to Images Due 4 th Week of Spring 2018 at the start of lab CSE 7, Spring 2018

Homework #2: Introduction to Images Due 4 th Week of Spring 2018 at the start of lab CSE 7, Spring 2018 Homework #2: Introduction to Images Due 4 th Week of Spring 2018 at the start of lab CSE 7, Spring 2018 Before beginning this homework, create a new Notepad++ file in your cs7sxx home directory on ieng6

More information

The Fundamentals. Document Basics

The Fundamentals. Document Basics 3 The Fundamentals Opening a Program... 3 Similarities in All Programs... 3 It's On Now What?...4 Making things easier to see.. 4 Adjusting Text Size.....4 My Computer. 4 Control Panel... 5 Accessibility

More information

Slide 1 CS 170 Java Programming 1 Multidimensional Arrays Duration: 00:00:39 Advance mode: Auto

Slide 1 CS 170 Java Programming 1 Multidimensional Arrays Duration: 00:00:39 Advance mode: Auto CS 170 Java Programming 1 Working with Rows and Columns Slide 1 CS 170 Java Programming 1 Duration: 00:00:39 Create a multidimensional array with multiple brackets int[ ] d1 = new int[5]; int[ ][ ] d2;

More information

Do you use Instagram? Have you tried the newest Instagram feature - Instagram Stories Highlights? As I was strolling through Instagram this past weekend, I couldn't help but notice that some of the brands

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

About Freeway. Freeway s Tools and Palettes

About Freeway. Freeway s Tools and Palettes About Freeway The most important thing to appreciate before you start a site in Freeway is how the process works, especially if you have tried other Web publishing software before. Freeway is not an HTML

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

Name: Student Workbook. Class:

Name: Student Workbook. Class: Name: Student Workbook Class: Workbook v0.9 Brought to you by the Bootstrap team: Emma Youndtsmith Emmanuel Schanzer Kathi Fisler Joe Politz Shriram Krishnamurthi Visual Design: Colleen Murphy Bootstrap

More information

n! = 1 * 2 * 3 * 4 * * (n-1) * n

n! = 1 * 2 * 3 * 4 * * (n-1) * n The Beauty and Joy of Computing 1 Lab Exercise 9: Problem self-similarity and recursion Objectives By completing this lab exercise, you should learn to Recognize simple self-similar problems which are

More information

Chemistry Excel. Microsoft 2007

Chemistry Excel. Microsoft 2007 Chemistry Excel Microsoft 2007 This workshop is designed to show you several functionalities of Microsoft Excel 2007 and particularly how it applies to your chemistry course. In this workshop, you will

More information

15-110: Principles of Computing, Spring 2018

15-110: Principles of Computing, Spring 2018 15-110: Principles of Computing, Spring 2018 Programming Assignment 3 Due: Tuesday, February 6 by 9PM Note: You are responsible for protecting your solutions to the following problems from being seen by

More information

CS 106 Winter Lab 05: User Interfaces

CS 106 Winter Lab 05: User Interfaces CS 106 Winter 2018 Lab 05: User Interfaces Due: Wednesday, February 6th, 11:59pm This lab will allow you to practice User Interfaces using Direct Manipulation and ControlP5. Each question is on a separate

More information

Name: Bootstrap:2. Class:

Name: Bootstrap:2. Class: Name: Bootstrap:2 Class: Lesson 1 Racket Code (define AGE 14) (define A-NUMBER 0.6) (define SPEED -90) Pyret Code AGE = 14 A-NUMBER = 0.6 SPEED = -90 Numbers Two of your own: (define CLASS Bootstrap )

More information

Creating a Flyer. Open Microsoft Publisher. You will see the list of Popular Publication Types. Click the Blank Page Sizes.

Creating a Flyer. Open Microsoft Publisher. You will see the list of Popular Publication Types. Click the Blank Page Sizes. Creating a Flyer Open Microsoft Publisher. You will see the list of Popular Publication Types. Click the Blank Page Sizes. Double click on Letter (Portrait) 8.56 x 11 to open up a Blank Page. Go to File

More information

How to...create a Video VBOX Gauge in Inkscape. So you want to create your own gauge? How about a transparent background for those text elements?

How to...create a Video VBOX Gauge in Inkscape. So you want to create your own gauge? How about a transparent background for those text elements? BASIC GAUGE CREATION The Video VBox setup software is capable of using many different image formats for gauge backgrounds, static images, or logos, including Bitmaps, JPEGs, or PNG s. When the software

More information

Style and Submission Guide

Style and Submission Guide Style and Submission Guide 1 Assignment Style Guidelines The code you submit for assignments, as with all code you write, can be made more readable and useful by paying attention to style. This includes

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

Introduction To Inkscape Creating Custom Graphics For Websites, Displays & Lessons

Introduction To Inkscape Creating Custom Graphics For Websites, Displays & Lessons Introduction To Inkscape Creating Custom Graphics For Websites, Displays & Lessons The Inkscape Program Inkscape is a free, but very powerful vector graphics program. Available for all computer formats

More information

Earthwork 3D for Dummies Doing a digitized dirt takeoff calculation the swift and easy way

Earthwork 3D for Dummies Doing a digitized dirt takeoff calculation the swift and easy way Introduction Earthwork 3D for Dummies Doing a digitized dirt takeoff calculation the swift and easy way Getting to know you Earthwork has inherited its layout from its ancestors, Sitework 98 and Edge.

More information

EEN118 LAB TWO. 1. A Five-Pointed Star.

EEN118 LAB TWO. 1. A Five-Pointed Star. EEN118 LAB TWO The purpose of this lab is to get practice with defining and using your own functions. The essence of good structured programming is to split large problems into smaller and smaller sub-problems.

More information

PowerPoint Slide Basics. Introduction

PowerPoint Slide Basics. Introduction PowerPoint 2016 Slide Basics Introduction Every PowerPoint presentation is composed of a series of slides. To begin creating a slide show, you'll need to know the basics of working with slides. You'll

More information

Creating Web Pages with SeaMonkey Composer

Creating Web Pages with SeaMonkey Composer 1 of 26 6/13/2011 11:26 PM Creating Web Pages with SeaMonkey Composer SeaMonkey Composer lets you create your own web pages and publish them on the web. You don't have to know HTML to use Composer; it

More information

;; ;; Section 1 ;; ;; ;; What is the value of: (+ 2 (* 3 5)) ;; What is the value of: (string-append "Roberto" " " "Luongo")

;; ;; Section 1 ;; ;; ;; What is the value of: (+ 2 (* 3 5)) ;; What is the value of: (string-append Roberto   Luongo) CPSC 110, Fall 2010 Practice Problems for Midterm 1 These problems are intended to provide you with practice exercises for the first midterm. Additional practice problems covering material from week 4

More information

Tips from the experts: How to waste a lot of time on this assignment

Tips from the experts: How to waste a lot of time on this assignment Com S 227 Spring 2018 Assignment 1 80 points Due Date: Friday, February 2, 11:59 pm (midnight) Late deadline (25% penalty): Monday, February 5, 11:59 pm General information This assignment is to be done

More information

PowerPoint Introduction. Video: Slide Basics. Understanding slides and slide layouts. Slide Basics

PowerPoint Introduction. Video: Slide Basics. Understanding slides and slide layouts. Slide Basics PowerPoint 2013 Slide Basics Introduction PowerPoint presentations are made up of a series of slides. Slides contain the information you will present to your audience. This might include text, pictures,

More information

Working with images and scenes

Working with images and scenes Working with images and scenes CS 5010 Program Design Paradigms Bootcamp Mitchell Wand, 2012-2014 This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. 1 Lesson

More information

Tips from the experts: How to waste a lot of time on this assignment

Tips from the experts: How to waste a lot of time on this assignment Com S 227 Spring 2017 Assignment 1 80 points Due Date: Thursday, February 2, 11:59 pm (midnight) Late deadline (25% penalty): Friday, February 3, 11:59 pm General information This assignment is to be done

More information

Designer Reference 1

Designer Reference 1 Designer Reference 1 Table of Contents USE OF THE DESIGNER...4 KEYBOARD SHORTCUTS...5 Shortcuts...5 Keyboard Hints...5 MENUS...7 File Menu...7 Edit Menu...8 Favorites Menu...9 Document Menu...10 Item Menu...12

More information

MITOCW watch?v=r6-lqbquci0

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

Introduction to Programming with JES

Introduction to Programming with JES Introduction to Programming with JES Titus Winters & Josef Spjut October 6, 2005 1 Introduction First off, welcome to UCR, and congratulations on becoming a Computer Engineering major. Excellent choice.

More information

HO-FL1: INTRODUCTION TO FLASH

HO-FL1: INTRODUCTION TO FLASH HO-FL1: INTRODUCTION TO FLASH Introduction Flash is software authoring package for creating scalable, interactive animations (or movies) for inclusion in web pages. It can be used to create animated graphics,

More information

Homework: More Abstraction, Trees, and Lists

Homework: More Abstraction, Trees, and Lists Homework: More Abstraction, Trees, and Lists COMP 50 Fall 2013 This homework is due at 11:59PM on Monday, November 18. Submit your solutions in a single file using the COMP 50 Handin button on DrRacket;

More information

Programming Assignment 8 ( 100 Points )

Programming Assignment 8 ( 100 Points ) Programming Assignment 8 ( 100 Points ) Due: 11:59pm Wednesday, November 22 Start early Start often! README ( 10 points ) You are required to provide a text file named README, NOT Readme.txt, README.pdf,

More information

Magazine-style websites often have lots of small items on a page. First you re going to create a heading and background for your magazine.

Magazine-style websites often have lots of small items on a page. First you re going to create a heading and background for your magazine. Magazine Introduction In this project, you ll learn how to use HTML and CSS to create a multi-page magazine website with a two page layout. You ll also revisit lots of HTML and CSS techiques from other

More information

CS 2110 Fall Instructions. 1 Installing the code. Homework 4 Paint Program. 0.1 Grading, Partners, Academic Integrity, Help

CS 2110 Fall Instructions. 1 Installing the code. Homework 4 Paint Program. 0.1 Grading, Partners, Academic Integrity, Help CS 2110 Fall 2012 Homework 4 Paint Program Due: Wednesday, 12 November, 11:59PM In this assignment, you will write parts of a simple paint program. Some of the functionality you will implement is: 1. Freehand

More information

CS Week 14 Lab Exercise

CS Week 14 Lab Exercise CS 111 - Week 14 Lab Exercise p.1 Deadline CS 111 - Week 14 Lab Exercise - 2018-11-05 Due by the end of lab on 2018-11-26. (Submit whatever you have by the end of lab, even if incomplete.) How to submit

More information

CS Fall Homework 5 p. 1. CS Homework 5

CS Fall Homework 5 p. 1. CS Homework 5 CS 235 - Fall 2015 - Homework 5 p. 1 Deadline: CS 235 - Homework 5 Due by 11:59 pm on Wednesday, September 30, 2015. How to submit: Submit your files using ~st10/235submit on nrs-projects, with a homework

More information

What can we do with Processing? Let s check. Natural Language and Dialogue Systems Lab Guest Image. Remember how colors work.

What can we do with Processing? Let s check. Natural Language and Dialogue Systems Lab Guest Image. Remember how colors work. MIDTERM REVIEW: THURSDAY I KNOW WHAT I WANT TO REVIEW. BUT ALSO I WOULD LIKE YOU TO TELL ME WHAT YOU MOST NEED TO GO OVER FOR MIDTERM. BY EMAIL AFTER TODAY S CLASS. What can we do with Processing? Let

More information

DIRECTV Message Board

DIRECTV Message Board DIRECTV Message Board DIRECTV Message Board is an exciting new product for commercial customers. It is being shown at DIRECTV Revolution 2012 for the first time, but the Solid Signal team were lucky enough

More information

Slide 1 CS 170 Java Programming 1

Slide 1 CS 170 Java Programming 1 CS 170 Java Programming 1 Objects and Methods Performing Actions and Using Object Methods Slide 1 CS 170 Java Programming 1 Objects and Methods Duration: 00:01:14 Hi Folks. This is the CS 170, Java Programming

More information

15100 Fall 2005 Final Project

15100 Fall 2005 Final Project 15100 Fall 2005 Final Project Robby Findler & Jacob Matthews 1 Introduction to Sudoku Sudoku is a logic puzzle set on a nine by nine grid. The goal is to fill in the blank spaces in the puzzle with the

More information

Android Programming Family Fun Day using AppInventor

Android Programming Family Fun Day using AppInventor Android Programming Family Fun Day using AppInventor Table of Contents A step-by-step guide to making a simple app...2 Getting your app running on the emulator...9 Getting your app onto your phone or tablet...10

More information

15-110: Principles of Computing, Spring 2018

15-110: Principles of Computing, Spring 2018 5-: Principles of Computing, Spring 28 Problem Set 8 (PS8) Due: Friday, March 3 by 2:3PM via Gradescope Hand-in HANDIN INSTRUCTIONS Download a copy of this PDF file. You have two ways to fill in your answers:.

More information

Using Flash Animation Basics

Using Flash Animation Basics Using Flash Contents Using Flash... 1 Animation Basics... 1 Exercise 1. Creating a Symbol... 2 Exercise 2. Working with Layers... 4 Exercise 3. Using the Timeline... 6 Exercise 4. Previewing an animation...

More information