CS Homework 2 p. 1. CS Homework 2

Size: px
Start display at page:

Download "CS Homework 2 p. 1. CS Homework 2"

Transcription

1 CS Homework 2 p. 1 Deadline 11:59 pm on Friday, February 2, 2018 Purpose CS Homework 2 To practice defining and using named constants and check-expect expressions, and to practice using the design recipe to define and test functions. How to submit You will submit your 111hw2.rkt file for Homework 2 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 111hw2.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 2 link (in the Homeworks section). Follow the Canvas instructions for uploading your Racket file 111hw2.rkt. Important notes Signature and purpose statement comments are ONLY required for functions that you have written and defined yourself you do not write them for named constants, or for functions that are already built into the Racket environment or the teachpacks. 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. For example, signature: triple: number -> number signature: say-bye: string -> string 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

2 CS Homework 2 p. 2 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). Problem 1 NOTE: you are NOT writing any new functions in this problem -- you are practicing writing and using a named constant, and practicing writing some check-expect compound expressions. Open a new Racket Definitions file (it's a good idea to immediately save the file 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 2, followed by a comment-line giving the date you last modified this homework -- for example: type in YOUR name CS HW 2 last modified: Then put a blank line, and the expression that loads the 2htdp/image teachpack. Blank lines help make your code more readable! (require 2htdp/image) Below this, after a blank line, now type the comment lines: Problem 1 1 part a Remember the image you created for Homework 1, Problem 6? Copy that compound expression here. (If you didn't finish Homework 1, Problem 6, then create a new compound expression from those instructions.) You are probably more familiar now with image operations than you were when completing Homework 1 --

3 CS Homework 2 p. 3 as long as the image still meets the requirements from Homework 1, you may change and improve upon the image if you would like to. This is optional. Here, again, are the requirements for the image: ******** FROM HOMEWORK 1, Problem 6 ******** Write one or more expressions that meet the following requirements: the final resulting image somehow should be the result of at least THREE different image or imagerelated operations from the 2htdp/image teachpack. (More is fine!) They can be image operations from the "Some DrRacket Tidbits" handout, OR they can be image operations (from the 2htdp/image teachpack) that you find by exploring DrRacket's Help feature, described a bit at the end of the "Some DrRacket Tidbits" handout. the final resulting image should be an expression of type image that is precisely 200 pixels wide and 200 pixels high ACCEPTABLE "extended" version of this problem: IF you would like to use define to give names to some expressions to make your task easier, that is allowed and encouraged (but not required) for this problem. [We had not yet covered the style rules for such named constants for Homework 1 -- since we have now, make sure any such named constants are now descriptive and written in all-uppercase.] As long as you meet the above requirements, your image may be as simple or as complex as you would like. ******** end of part FROM HOMEWORK 1, Problem 6 ******** THEN: write a Racket define expression to define a named constant whose value is your entire finished image. write the simple expression consisting of your newly-defined named constant -- when you now click Run, you'll see that the value of this named constant is your image. 1 part b You're now going to test that your image is exactly 200 pixels wide and 200 pixels high. Recall that operation image-width expects an image and returns its width in pixels, and that operation image-height expects an image and returns its height in pixels. Write TWO check-expect expressions: Write a check-expect expression, using image-width and the named constant for your finished image from Problem 1a, that will pass if your named constant image is exactly 200 pixels wide. Write a check-expect expression using image-height and the named constant for your finished image from Problem 1a, that will pass if your named constant image is exactly 200 pixels high. Run your code to test your image! If your image doesn't pass both tests, then you need to revisit Problem 1 part a and alter your image so that it passes the tests. Problem 2

4 CS Homework 2 p. 4 Problem 2 Now, you are defining a new function! First, consider: given a rectangle's measurements, how can you figure out that rectangle's perimeter (the distance AROUND that rectangle)? You are now going to follow the design recipe steps to write a function rect-perim (I'm specifying the function name to make it easier to test when the assignments are graded). 2 part a How many and what data type of expression(s) should rect-perim expect, to be able to return such a perimeter? What data type should rect-perim produce? Now write an appropriate signature comment for rect-perim. 2 part b Write an appropriate purpose statement comment for rect-perim. 2 part c START the define expression for the function rect-perim, including an appropriate function header 2 part d Write at least 2 specific tests/check-expect expressions for rect-perim. Interestingly, you may actually place these either before or after your not-yet-completed function definition, whichever you prefer. 2 part e Only NOW should you replace the... in rect-perim's function body with an appropriate expression to complete this function, that calculates the value rect-perim will produce. Run and test your function rect-perim 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 rect-perim (so that you will see their results) after your function definition for rect-perim. Problem 3 Problem 3

5 CS Homework 2 p. 5 Consider a function that asks a given person how their day is going. Given a person's name, it returns How's it going,...that person's name...? (Optionally, you may change the exact wording of the question, as long as it includes the person's name and ends with at least one question mark.) You are now going to follow the design recipe steps to write this function ask-abt-day. 3 part a How many and what data type of expression(s) should ask-abt-day expect, to be able to return such a question? What data type should ask-abt-day produce? Now write an appropriate signature comment for ask-abt-day. 3 part b Write an appropriate purpose statement comment for this function. 3 part c START the define expression for the function ask-abt-day, including an appropriate function header 3 part d Write at least 2 specific tests/check-expect expressions for ask-abt-day, placed either before or after your not-yet-completed function definition, whichever you prefer. 3 part e Only NOW should you replace the... in ask-abt-day's function body with an appropriate expression to complete this function, that determines the value ask-abt-day will produce. Run and test your function ask-abt-day 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 ask-abt-day (so that you will see their results) after your function definition for ask-abt-day. Problem 4 Problem 4 Suppose someone decides it would be useful to be able to take an image and its desired title, and create a new image that includes that image above that title (as PART of the resulting image), with the title shown in 24- pixel-high black letters. You are now going to follow the design recipe steps to write this function title-img. (HINT: The text function expects a string and produces an image from the contents of the string.)

6 CS Homework 2 p. 6 4 part a How many and what data type of expression(s) should title-img expect, to be able to return such an image? What data type should title-img produce? Now write an appropriate signature comment for title-img. 4 part b Write an appropriate purpose statement comment for this function. 4 part c START the define expression for this function title-img, including an appropriate function header 4 part d Write at least 2 specific tests/check-expect expressions for title-img, placed either before or after your not-yet-completed function definition, whichever you prefer. 4 part e Only NOW should you replace the... in title-img's function body with an appropriate expression to complete this function, that determines the value title-img will produce. Run and test your function title-img 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 title-img (so that you will see their results) after your function definition for title-img. Problem 5 Problem 5 Consider a function total-feet that expects a number of yards and a number of feet, and returns the total number of feet. (For example, the value of the expression (total-feet 4 5) should be 17, because 4 yards and 5 feet is 17 feet overall.) You are now going to follow the design recipe steps to write this function total-feet. 5 part a This part comes BEFORE starting the function total-feet! FIRST: write a Racket definition for a named constant that will define the name FEET-PER-YARD to be the number of feet in a yard. (FEET-PER-YARD is NOT a function! It is just a number, the number of feet in a single yard.)

7 CS Homework 2 p. 7 5 part b How many and what data type of expression(s) should total-feet expect from the user, to be able to return such a total? What data type should total-feet produce? Now write an appropriate signature comment for total-feet. 5 part c Write an appropriate purpose statement comment for total-feet. 5 part d START the define expression for this function total-feet, including an appropriate function header 5 part e Write at least 2 specific tests/check-expect expressions for total-feet, at least one for a number of yards of 0, and at least one for a number of yards greater than 1, (each with a DIFFERENT number of feet),...placed either before or after your not-yet-completed function definition, whichever you prefer. 5 part f Only NOW should you replace the... in total-feet's function body with an appropriate expression to complete this function, that determines the value total-feet will produce. FOR FULL CREDIT, ALSO make sure that you USE the named constant FEET-PER-YARD appropriately within total-feet's function body's expression. Run and test your function total-feet 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 total-feet (so that you will see their results) after your function definition for total-feet. Problem 6 Problem 6 (This is adapted from Homework 1 of J. Marshall's "The Way of the Program" course at Sarah Lawrence College.) The Tasty-Waking coffee roasters sells whole-bean coffee at $6.95 per pound plus the cost of shipping. Each order ships for $0.75 per pound plus $2.75 fixed cost for overhead.

8 CS Homework 2 p. 8 (For example, if someone buys 1 pound of whole-bean coffee, the total price is $ If someone buys 2 pounds of whole-bean coffee, the total price is $ If someone buys 5 pounds, the total is $41.25.) 6 part a FIRST: The description above includes 3 constant values. Define 3 appropriate, descriptive named constants for these values. (This is so, when prices change, all you need to do is change the constant definitions!) 6 part b Consider a function named order-cost whose purpose is to calculate the total cost for an order. How many and what data type of expression(s) should order-cost expect from the user, to be able to return such a total cost? What data type should order-cost produce? Now write an appropriate signature comment for order-cost. Hint: don't include named constants in the signature! The 3 named constants do NOT need to be given as arguments to this function! Think about it this way a customer doesn't need to tell you the prices of your product and shipping costs you already know that because you work there and are already aware of those prices. The value(s) the function should expect is/are the value(s) a customer does need to give when placing an order. So what does a customer need to tell the store when ordering coffee beans? 6 part c Write an appropriate purpose statement comment for order-cost. 6 part d START the define expression for this function order-cost, including an appropriate function header (Hint: named constants do not belong in a function header, either your function header should have parameter identifiers only for what the signature and purpose say is expected by the function.) 6 part e Write at least 2 specific tests/check-expect expressions for order-cost, placed either before or after your not-yet-completed function definition, whichever you prefer. 6 part f Only NOW should you replace the... in order-cost's function body with an appropriate expression to complete this function, that determines the value order-cost will produce. FOR FULL CREDIT, ALSO make sure that NOW you USE the named constants from Problem 6 part a ppropriately within order-cost's function body's expression. Run and test your function order-cost 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 order-cost (so that you will see their results) after your function definition for order-cost.

Spring CS Homework 3 p. 1. CS Homework 3

Spring CS Homework 3 p. 1. CS Homework 3 Spring 2018 - CS 111 - Homework 3 p. 1 Deadline 11:59 pm on Friday, February 9, 2018 Purpose CS 111 - Homework 3 To try out another testing function, check-within, to get more practice using the design

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

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

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 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

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

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

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 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

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

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

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

Spring CS Homework 2 p. 1. CS Homework 2. To practice with PL/SQL stored procedures and functions, and possibly exception handling.

Spring CS Homework 2 p. 1. CS Homework 2. To practice with PL/SQL stored procedures and functions, and possibly exception handling. Spring 2018 - CS 328 - Homework 2 p. 1 Deadline Due by 11:59 pm on Sunday, February 4, 2018. Purpose CS 328 - Homework 2 To practice with PL/SQL stored procedures and functions, and possibly exception

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

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

Read every line of the exam sheet before programming!

Read every line of the exam sheet before programming! Final Exam, CS130 Fall 2006 Instructions. This exam is similar to the midterms, except that you have two hours and fifteen minutes to work. The executable file to submit is Final.exe. Don t forget to put

More information

CMSC 201 Spring 2018 Project 2 Battleship

CMSC 201 Spring 2018 Project 2 Battleship CMSC 201 Spring 2018 Project 2 Battleship Assignment: Project 2 Battleship Due Date: Design Document: Friday, April 13th, 2018 by 8:59:59 PM Project: Friday, April 20th, 2018 by 8:59:59 PM Value: 80 points

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

CS 202, Fall 2017 Homework #4 Balanced Search Trees and Hashing Due Date: December 18, 2017

CS 202, Fall 2017 Homework #4 Balanced Search Trees and Hashing Due Date: December 18, 2017 CS 202, Fall 2017 Homework #4 Balanced Search Trees and Hashing Due Date: December 18, 2017 Important Notes Please do not start the assignment before reading these notes. Before 23:55, December 18, upload

More information

How To Test Your Code A CS 1371 Homework Guide

How To Test Your Code A CS 1371 Homework Guide Introduction After you have completed each drill problem, you should make it a habit to test your code. There are good ways of testing your code and there are bad ways of testing your code. This guide

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

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

CS Homework 5 p. 1. CS Homework 5

CS Homework 5 p. 1. CS Homework 5 CS 325 - Homework 5 p. 1 Deadline CS 325 - Homework 5 Problem 1 -- answering reading questions on Canvas for DB Reading Packet 5 -- must be completed by 10:45 am on Tuesday, September 26. The remaining

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

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

CS Homework 4 p. 1. CS Homework 4

CS Homework 4 p. 1. CS Homework 4 CS 325 - Homework 4 p. 1 Deadline: 11:59 pm on Friday, October 7, 2016 How to submit: CS 325 - Homework 4 Each time you wish to submit, within the directory 325hw4 on nrs-projects.humboldt.edu (and at

More information

CS Homework 4 p. 1. CS Homework 4

CS Homework 4 p. 1. CS Homework 4 CS 325 - Homework 4 p. 1 Deadline 11:59 pm on Friday, October 3, 2014 How to submit CS 325 - Homework 4 Each time you wish to submit, within the directory 325hw4 on nrs-projects.humboldt.edu (and at the

More information

CS Homework 5 p. 1. CS Homework 5

CS Homework 5 p. 1. CS Homework 5 CS 325 - Homework 5 p. 1 Deadlines: CS 325 - Homework 5 Problem 1 -- answering reading questions on Moodle for Reading Packet 4 -- had to be completed by 4:45 pm on Thursday, September 24. The remaining

More information

Com S 227 Spring 2018 Assignment points Due Date: Thursday, September 27, 11:59 pm (midnight) "Late" deadline: Friday, September 28, 11:59 pm

Com S 227 Spring 2018 Assignment points Due Date: Thursday, September 27, 11:59 pm (midnight) Late deadline: Friday, September 28, 11:59 pm Com S 227 Spring 2018 Assignment 2 200 points Due Date: Thursday, September 27, 11:59 pm (midnight) "Late" deadline: Friday, September 28, 11:59 pm (Remember that Exam 1 is MONDAY, October 1.) General

More information

University of Washington, CSE 154 Homework Assignment 7: To-Do List

University of Washington, CSE 154 Homework Assignment 7: To-Do List University of Washington, CSE 154 Homework Assignment 7: To-Do List In this assignment you will write a web application for an online to-do list. The assignment tests your understanding of user login sessions

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

3 Categories and Attributes

3 Categories and Attributes 3 The combination of products, presentation, and service makes our store unique. In this chapter, we will see how to add products to our store. Before adding products, we need to make some decisions about

More information

Black Problem 2: Huffman Compression [75 points] Next, the Millisoft back story! Starter files

Black Problem 2: Huffman Compression [75 points] Next, the Millisoft back story! Starter files Black Problem 2: Huffman Compression [75 points] Copied from: https://www.cs.hmc.edu/twiki/bin/view/cs5/huff manblack on 3/15/2017 Due: 11:59 PM on November 14, 2016 Starter files First, here is a set

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 100 points Due Date: Friday, September 14, 11:59 pm (midnight) Late deadline (25% penalty): Monday, September 17, 11:59 pm General information This assignment is to be

More information

edocs Aero Users Management

edocs Aero Users Management edocs Aero Users Management Description edocs Aero Users Management System allows Company Admin to sync and control Users with other systems, by importing a CSV file. Admin can Add Users Change Users status

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

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

CS Homework 10

CS Homework 10 CS 325 - Fall 2018 - Homework 10 p.1 Deadline 11:59 pm on Saturday, December 1, 2018 Purpose CS 325 - Homework 10 To think some more about integrities supported by DBMSs; to think some more about concepts

More information

Copied from: https://www.cs.hmc.edu/twiki/bin/view/cs5/lab1b on 3/20/2017

Copied from: https://www.cs.hmc.edu/twiki/bin/view/cs5/lab1b on 3/20/2017 Hw 1, Part 2 (Lab): Functioning smoothly! Using built-in functions Copied from: https://www.cs.hmc.edu/twiki/bin/view/cs5/lab1b on 3/20/2017 First, try out some of Python's many built-in functions. These

More information

Tracking changes in Word 2007 Table of Contents

Tracking changes in Word 2007 Table of Contents Tracking changes in Word 2007 Table of Contents TRACK CHANGES: OVERVIEW... 2 UNDERSTANDING THE TRACK CHANGES FEATURE... 2 HOW DID THOSE TRACKED CHANGES AND COMMENTS GET THERE?... 2 WHY MICROSOFT OFFICE

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

CS2500 Exam 2 Fall 2011

CS2500 Exam 2 Fall 2011 CS2500 Exam 2 Fall 2011 Name: Student Id (last 4 digits): Section (morning, honors or afternoon): Write down the answers in the space provided. You may use the usual primitives and expression forms, including

More information

Mathematical Reasoning. Lesson 47: Prisms and Cylinders. LESSON 47: Prisms and Cylinders. D. Legault, Minnesota Literacy Council,

Mathematical Reasoning. Lesson 47: Prisms and Cylinders. LESSON 47: Prisms and Cylinders. D. Legault, Minnesota Literacy Council, LESSON 47: Prisms and Cylinders Weekly Focus: prisms, cylinders Weekly Skill: calculate area and volume Lesson Summary: For the warm up, students will solve a problem about the earth and the moon. In Activity

More information

To practice overall problem-solving skills, as well as general design of a program

To practice overall problem-solving skills, as well as general design of a program Programming Assignment 5 Due March 27, 2015 at 11:59 PM Objectives To gain experience with file input/output techniques To gain experience with formatting output To practice overall problem-solving skills,

More information

CS Final Exam Review Suggestions - Fall 2017

CS Final Exam Review Suggestions - Fall 2017 CS 111 - Final Exam Review Suggestions p. 1 CS 111 - Final Exam Review Suggestions - Fall 2017 last modified: 2016-12-09 You are responsible for material covered in class sessions, lab exercises, and homeworks;

More information

CS2630: Computer Organization Homework 1 Bits, bytes, and memory organization Due January 25, 2017, 11:59pm

CS2630: Computer Organization Homework 1 Bits, bytes, and memory organization Due January 25, 2017, 11:59pm CS2630: Computer Organization Homework 1 Bits, bytes, and memory organization Due January 25, 2017, 11:59pm Instructions: Show your work. Correct answers with no work will not receive full credit. Whether

More information

CS Final Exam Review Suggestions - Spring 2014

CS Final Exam Review Suggestions - Spring 2014 CS 111 - Final Exam Review Suggestions p. 1 CS 111 - Final Exam Review Suggestions - Spring 2014 last modified: 2014-05-09 before lab You are responsible for material covered in class sessions, lab exercises,

More information

CMSC 201 Spring 2016 Homework 7 Strings and File I/O

CMSC 201 Spring 2016 Homework 7 Strings and File I/O CMSC 201 Spring 2016 Homework 7 Strings and File I/O Assignment: Homework 7 Strings and File I/O Due Date: Monday, April 4th, 2016 by 8:59:59 PM Value: 40 points Homework 7 is designed to help you practice

More information

CS Problem Solving and Object-Oriented Programming

CS Problem Solving and Object-Oriented Programming CS 101 - Problem Solving and Object-Oriented Programming Lab 5 - Draw a Penguin Due: October 28/29 Pre-lab Preparation Before coming to lab, you are expected to have: Read Bruce chapters 1-3 Introduction

More information

CS103 Handout 13 Fall 2012 May 4, 2012 Problem Set 5

CS103 Handout 13 Fall 2012 May 4, 2012 Problem Set 5 CS103 Handout 13 Fall 2012 May 4, 2012 Problem Set 5 This fifth problem set explores the regular languages, their properties, and their limits. This will be your first foray into computability theory,

More information

Lab 1: Setup 12:00 PM, Sep 10, 2017

Lab 1: Setup 12:00 PM, Sep 10, 2017 CS17 Integrated Introduction to Computer Science Hughes Lab 1: Setup 12:00 PM, Sep 10, 2017 Contents 1 Your friendly lab TAs 1 2 Pair programming 1 3 Welcome to lab 2 4 The file system 2 5 Intro to terminal

More information

CS 134 Programming Exercise 3:

CS 134 Programming Exercise 3: CS 134 Programming Exercise 3: Repulsive Behavior Objective: To gain experience implementing classes and methods. Note that you must bring a program design to lab this week! The Scenario. For this lab,

More information

IMPORTANT DATE: THE SUBMISSION DEADLINE FOR ALL ABSTRACTS IS EXTENDED TO Friday, March 9, 5:00 PM PT

IMPORTANT DATE: THE SUBMISSION DEADLINE FOR ALL ABSTRACTS IS EXTENDED TO Friday, March 9, 5:00 PM PT Thank you for your interest in submitting an Abstract for the 2018 Florida Society of Anesthesiologists Annual Meeting. This document is intended to be your guide in using the online submission software

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

CMSC 201 Spring 2018 Project 3 Minesweeper

CMSC 201 Spring 2018 Project 3 Minesweeper CMSC 201 Spring 2018 Project 3 Minesweeper Assignment: Project 3 Minesweeper Due Date: Design Document: Friday, May 4th, 2018 by 8:59:59 PM Project: Friday, May 11th, 2018 by 8:59:59 PM Value: 80 points

More information

Claremont McKenna College Computer Science

Claremont McKenna College Computer Science Claremont McKenna College Computer Science CS 51 Handout 4: Problem Set 4 February 10, 2011 This problem set is due 11:50pm on Wednesday, February 16. As usual, you may hand in yours until I make my solutions

More information

CS Homework 8 p. 1. CS Homework 8

CS Homework 8 p. 1. CS Homework 8 CS 325 - Homework 8 p. 1 Deadline: 11:59 pm on Friday, October 27, 2017 Purpose: CS 325 - Homework 8 To practice normalizing sets of relations into 1NF, 2NF, and 3NF, to practice writing more nested selects/subselects,

More information

Homework 2. Due 4:00pm, Wednesday, February 13, Installation and Handin 2

Homework 2. Due 4:00pm, Wednesday, February 13, Installation and Handin 2 Homework 2 Due 4:00pm, Wednesday, February 13, 2019 Installation and Handin 2 Part I: Understanding Loops (10) 2 Problem 2.1a) Tracing Mystery 2 Problem 2.1b) Nested Loops 3 Problem 2.1c) While Loops 3

More information

CS Homework 1 p. 1. CS Homework 1

CS Homework 1 p. 1. CS Homework 1 CS 335 - Homework 1 p. 1 Deadline: CS 335 - Homework 1 IF turned in on-paper: 11:59 am on Friday, February 4 IF submitted electronically: 11:59 pm on Friday, February 4 How to submit: Because of the nature

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

BIS1523 Homework Assignments 2.1

BIS1523 Homework Assignments 2.1 Homework Assignments 2.1 Folder: hw01 Assignment #1, Bio Overview: Create a web page with some information (real or made up) about yourself. Your web page should include the following: A header, with your

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

Homework 6: Higher-Order Procedures Due: 10:00 PM, Oct 17, 2017

Homework 6: Higher-Order Procedures Due: 10:00 PM, Oct 17, 2017 Integrated Introduction to Computer Science Hughes Homework 6: Higher-Order Procedures Due: 10:00 PM, Oct 17, 2017 Contents 1 Fun with map (Practice) 2 2 Unfold (Practice) 3 3 Map2 3 4 Fold 4 5 All You

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

CSCI 1301: Introduction to Computing and Programming Spring 2019 Lab 10 Classes and Methods

CSCI 1301: Introduction to Computing and Programming Spring 2019 Lab 10 Classes and Methods Note: No Brainstorm this week. This lab gives fairly detailed instructions on how to complete the assignment. The purpose is to get more practice with OOP. Introduction This lab introduces you to additional

More information

CS Homework 7 p. 1. CS Homework 7. Problem 1 - START THIS A.S.A.P. (in case there are PROBLEMS...)

CS Homework 7 p. 1. CS Homework 7. Problem 1 - START THIS A.S.A.P. (in case there are PROBLEMS...) CS 328 - Homework 7 p. 1 Deadline Due by 11:59 pm on Sunday, March 27, 2016 How to submit CS 328 - Homework 7 Submit your files for this homework using ~st10/328submit on nrs-projects, with a hw number

More information

CS 315 Software Design Homework 1 First Sip of Java Due: Sept. 10, 11:30 PM

CS 315 Software Design Homework 1 First Sip of Java Due: Sept. 10, 11:30 PM CS 315 Software Design Homework 1 First Sip of Java Due: Sept. 10, 11:30 PM Objectives The objectives of this assignment are: to get your first experience with Java to become familiar with Eclipse Java

More information

CMSC 201 Spring 2017 Homework 4 Lists (and Loops and Strings)

CMSC 201 Spring 2017 Homework 4 Lists (and Loops and Strings) CMSC 201 Spring 2017 Homework 4 Lists (and Loops and Strings) Assignment: Homework 4 Lists (and Loops and Strings) Due Date: Friday, March 3rd, 2017 by 8:59:59 PM Value: 40 points Collaboration: For Homework

More information

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG 1 Notice Reading Assignment Chapter 1: Introduction to Java Programming Homework 1 It is due this coming Sunday

More information

The design recipe. Readings: HtDP, sections 1-5. (ordering of topics is different in lectures, different examples will be used)

The design recipe. Readings: HtDP, sections 1-5. (ordering of topics is different in lectures, different examples will be used) The design recipe Readings: HtDP, sections 1-5 (ordering of topics is different in lectures, different examples will be used) Survival and Style Guides CS 135 Winter 2018 02: The design recipe 1 Programs

More information

CS106A Handout 28 Winter February 28, 2014 Second Practice Second CS106A Midterm

CS106A Handout 28 Winter February 28, 2014 Second Practice Second CS106A Midterm CS106A Handout 28 Winter 2013-2014 February 28, 2014 Second Practice Second CS106A Midterm This handout is intended to give you practice solving problems that are comparable in format and difficulty to

More information

Lesson 1 using Dreamweaver CS3. To get started on your web page select the link below and copy (Save Picture As) the images to your image folder.

Lesson 1 using Dreamweaver CS3. To get started on your web page select the link below and copy (Save Picture As) the images to your image folder. Lesson 1 using Dreamweaver CS3 To get started on your web page select the link below and copy (Save Picture As) the images to your image folder. Click here to get images for your web page project. (Note:

More information

Lab 3. A Multi-Message Reader

Lab 3. A Multi-Message  Reader Lab 3 A Multi-Message Email Reader Due: Wed. 2/21 at 11PM (for Mon. aft. lab), Thurs. 2/22 at 5PM (for Mon. evening), or Thurs. 2/22 at 11 (for Tues. aft.) The goal in this week s lab is to exercise your

More information

THE SUBMISSION DEADLINE FOR ALL ABSTRACTS IS FRIDAY, SEPTEMBER 7, 2018, 5:00 PM PDT

THE SUBMISSION DEADLINE FOR ALL ABSTRACTS IS FRIDAY, SEPTEMBER 7, 2018, 5:00 PM PDT Thank you for your interest in submitting an abstract for the upcoming North American Skull Based Society Annual Meeting. This document is intended to be your guide in using the online submission software

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

CS Homework 3. Deadline: How to submit: Purpose: Additional notes: Problem 1. CS Homework 3 p :59 pm on Thursday, October 3, 2013

CS Homework 3. Deadline: How to submit: Purpose: Additional notes: Problem 1. CS Homework 3 p :59 pm on Thursday, October 3, 2013 CS 325 - Homework 3 p. 1 Deadline: 11:59 pm on Thursday, October 3, 2013 How to submit: CS 325 - Homework 3 When you are ready, within the directory 325hw3 on nrs-projects.humboldt.edu (and at the nrsprojects

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

IMPORTANT DATE: THE SUBMISSION DEADLINE FOR ALL ABSTRACTS IS JANUARY 5, 11:59 PM PST

IMPORTANT DATE: THE SUBMISSION DEADLINE FOR ALL ABSTRACTS IS JANUARY 5, 11:59 PM PST Thank you for your interest in submitting an abstract for the upcoming Emerging Technology Session. This document is intended to be your guide in using the online submission software and we strongly suggest

More information

W13:Homework:H07. CS40 Foundations of Computer Science W13. From 40wiki

W13:Homework:H07. CS40 Foundations of Computer Science W13. From 40wiki W13:Homework:H07 From 40wiki CS40 Foundations of Computer Science W13 W13:Exams W13:Homework in Class and Web Work W13:Calendar W13:Syllabus and Lecture Notes UCSB-CS40-W13 on Facebook (https://www.facebook.com/groups/ucsb.cs40.w13/)

More information

Before submitting the file project5.py, check carefully that the header above is correctly completed:

Before submitting the file project5.py, check carefully that the header above is correctly completed: 1 of 10 8/26/2013 12:43 PM Due date: December 6th, 23:59PM Teamwork reflection due date: December 6th, 23:59PM This is a team project. The project is worth 100 points. All the team members will get an

More information

Part I: Written Problems

Part I: Written Problems CSci 4223 Homework 1 DUE: Friday, February 1, 11:59 pm Instructions. Your task is to answer three written problems, and to write eleven SML functions related to calendar dates, as well as test cases for

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

CS Homework 4 p. 1. CS Homework 4

CS Homework 4 p. 1. CS Homework 4 CS 328 - Homework 4 p. 1 Deadline Due by 11:59 pm on Sunday, February 19, 2017 Purpose CS 328 - Homework 4 To practice some more with PL/SQL stored subroutines and "strict"-style HTML5 (now also including

More information

This assignment should give you practice with some aspects of working with graphics and windows in Java.

This assignment should give you practice with some aspects of working with graphics and windows in Java. Assignment 5 Due: Tuesday, July 24 by 11:59 PM Objective This assignment should give you practice with some aspects of working with graphics and windows in Java. Task Write a program utilizing a JDesktopFrame

More information

Data Structure and Algorithm Homework #6 Due: 5pm, Friday, June 14, 2013 TA === Homework submission instructions ===

Data Structure and Algorithm Homework #6 Due: 5pm, Friday, June 14, 2013 TA   === Homework submission instructions === Data Structure and Algorithm Homework #6 Due: 5pm, Friday, June 14, 2013 TA email: dsa1@csie.ntu.edu.tw === Homework submission instructions === For Problem 1, submit your source codes, a Makefile to compile

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

Readers are wary of out of date content, so it's important to actively manage the information you publish.

Readers are wary of out of date content, so it's important to actively manage the information you publish. Web Style Guide Important tips for writing for the web People don t usually read for pleasure on the website. They are looking for a specific piece of information, and they don't want extraneous junk to

More information

Create a three column layout using CSS, divs and floating

Create a three column layout using CSS, divs and floating GRC 275 A6 Create a three column layout using CSS, divs and floating Tasks: 1. Create a 3 column style layout 2. Must be encoded using HTML5 and use the HTML5 semantic tags 3. Must se an internal CSS 4.

More information

Assignment #1: and Karel the Robot Karel problems due: 3:15pm on Friday, October 4th due: 11:59pm on Sunday, October 6th

Assignment #1:  and Karel the Robot Karel problems due: 3:15pm on Friday, October 4th  due: 11:59pm on Sunday, October 6th Mehran Sahami Handout #7 CS 06A September, 0 Assignment #: Email and Karel the Robot Karel problems due: :pm on Friday, October th Email due: :9pm on Sunday, October 6th Part I Email Based on a handout

More information

Lab 4 CSE 7, Spring 2018 This lab is an introduction to using logical and comparison operators in Matlab.

Lab 4 CSE 7, Spring 2018 This lab is an introduction to using logical and comparison operators in Matlab. LEARNING OBJECTIVES: Lab 4 CSE 7, Spring 2018 This lab is an introduction to using logical and comparison operators in Matlab 1 Use comparison operators (< > = == ~=) between two scalar values to create

More information

EE168 Lab/Homework #1 Introduction to Digital Image Processing Handout #3

EE168 Lab/Homework #1 Introduction to Digital Image Processing Handout #3 EE168 Lab/Homework #1 Introduction to Digital Image Processing Handout #3 We will be combining laboratory exercises with homework problems in the lab sessions for this course. In the scheduled lab times,

More information

How to do a "Mail Merge" from a Calc spreadsheet.

How to do a Mail Merge from a Calc spreadsheet. How to do a "Mail Merge" from a Calc spreadsheet. provided by the OpenOffice.org Documentation Project OpenOffice.org Documentation Project How-To Table of Contents 1. Creation of the Database Source...3

More information

Homework 7: Subsets Due: 11:59 PM, Oct 23, 2018

Homework 7: Subsets Due: 11:59 PM, Oct 23, 2018 CS17 Integrated Introduction to Computer Science Klein Contents Homework 7: Subsets Due: 11:59 PM, Oct 23, 2018 1 Bookends (Practice) 2 2 Subsets 3 3 Subset Sum 4 4 k-subsets 5 5 k-subset Sum 5 Objectives

More information

For those working on setting up Super Star Online for the school year, here are a few tips:

For those working on setting up Super Star Online for the school year, here are a few tips: Back to School Help For those working on setting up Super Star Online for the 2018-2019 school year, here are a few tips: 1. You have a choice to start with a fresh new site or you can let your kids keep

More information

Module 3: New types of data

Module 3: New types of data Module 3: New types of data Readings: Sections 4 and 5 of HtDP. A Racket program applies functions to values to compute new values. These new values may in turn be supplied as arguments to other functions.

More information

Problem Set 1 Due: 11:59pm Wednesday, February 7

Problem Set 1 Due: 11:59pm Wednesday, February 7 CS251 Programming Languages Handout # 13 Prof. Lyn Turbak January 31, 2007 Wellesley College Reading: Problem Set 1 Due: 11:59pm Wednesday, February 7 Handouts #1 #12 (only Chapters 1 5 of Handout #9 =

More information

CIT 590 Homework 5 HTML Resumes

CIT 590 Homework 5 HTML Resumes CIT 590 Homework 5 HTML Resumes Purposes of this assignment Reading from and writing to files Scraping information from a text file Basic HTML usage General problem specification A website is made up of

More information

WWU CSCI 101 Project 2. Project 2 - Fence Pricing Calculator. Goals: Guideline: 1. Familiarity with web page development using HTML and JavaScript

WWU CSCI 101 Project 2. Project 2 - Fence Pricing Calculator. Goals: Guideline: 1. Familiarity with web page development using HTML and JavaScript Project 2 - Fence Pricing Calculator Goals: 1. Familiarity with web page development using HTML and JavaScript 2. Organizing ideas and presenting ideas in a logical fashion 3. Create a calculator-style

More information