CMSC 104, Version 9/01 1 Functions, Part 3 of 3 Topics: Coding Practice o In-Class Project: The Box o In-Class Project: Drawing a Rectangle Reading: None.

Slides:



Advertisements
Similar presentations
In our lesson today we will learn how to find the area of a building.
Advertisements

CMSC 104, Version 9/011 Arithmetic Operators Topics Arithmetic Operators Operator Precedence Evaluating Arithmetic Expressions In-class Project Incremental.
Chapter 3 Planning Your Solution
Algorithms IV: Top-Down Design
Chapter 1 Pseudocode & Flowcharts
How To Find Your Used Barcode Range for a Particular Vendor in Destiny.
Perimeter Is the sum of the lengths of the sides. When solving a perimeter problem, it is helpful to draw and label a figure to model the region.
Adapted from slides by Marie desJardins
CMSC 104, Version 9/01 1 The Box Problem: Write an interactive program to compute and display the volume and surface area of a box. The program must also.
A cube has a total surface area of 24 cm2
Multiplying Polynomials
Math 5 Volume of Right Rectangular Prism Instructor: Mrs. Tew Turner.
PYTHON PROGRAMMING Week 10 – Wednesday. TERMS – CHAPTER 1 Write down definitions for these terms:  Computation  Computability  Computing  Artificial.
Solid Figures 7 th Grade Georgia Standard of Excellence: MGSE7.G.6 Solve real-world and mathematical problems involving area, volume and surface area of.
Surface Area of Prisms Math 10-3 Ch.3 Measurement.
Algorithmic Problem Solving CMSC 201 Adapted from slides by Marie desJardins (Spring 2015 Prof Chang version)
CMSC 104, Version 9/011 Incremental Programming Topics Review of Incremental Programming Example of Incremental Programming Reading None.
Starting screen for Google Sketchup Sketchup is used to make 3 dimensional objects 3 axis – Green is x axis Red is y axis Blue is z axis.
CMSC 104, Section 301, Fall Lecture 06, 9/18/02 Algorithms, Part 3 of 3 Topics Disk Quota Exceeded. Using Pine. More Algorithms Reading Read.
Arithmetic Operators Topics Arithmetic Operators Operator Precedence
Volume Performance Task Rectangular Prisms
Writing Program Code in BASIC Write a program to prompt for and accept values into TWO variables, numx and numy. The program should square the value stored.
Objectives I will use the distributive property to factor a polynomial.
1.To begin click: File, New, then select Design 2.Draw a circle, then use the dimension tool to set it’s size to 84 diameter or 42 radius. 3. Next draw.
How can you multiply a two digit by digit number using an area model?
1 Algorithms Practice Topics In-Class Project: Tip Calculator In-Class Project: Drawing a Rectangle.
CMSC 104, Version 8/061L10ArithmeticOps.ppt Arithmetic Operators Topics Arithmetic Operators Operator Precedence Evaluating Arithmetic Expressions In-class.
Warm-Up #1 11/30 1. Write down these 3 formulas:
Open Area Model of Multiplication
Algorithms, Part 3 of 3 Topics In-Class Project: The Box
Intro to Loops 1.General Knowledge 2.Two Types of Loops 3.The WHILE loop 1.
Make a Model A box company makes boxes to hold popcorn. Each box is made by cutting the square corners out of a rectangular sheet of cardboard. The rectangle.
VOLUME What is Volume?  Volume is the measure of the capacity of a container.
+ Pyramids and Prisms. + Solid An object with 3 Dimensions Height, Width, Length.
Squared and Cubed Conversion Factors
Go Back > Question 1 8x 3 ? A cube has side length 2x. What is its volume? 2a.
CMSC 104, Version 8/061L16IncrementalProg.ppt Incremental Programming Topics Review of Incremental Programming Example of Incremental Programming Reading.
Surface area of a cylinder Imagine a cylinder opened out Rectangle Circle.
Arithmetic Operators Topics Arithmetic Operators Operator Precedence
2008/09/22: Lecture 6 CMSC 104, Section 0101 John Y. Park
Quiz.
2.2 Multiply Polynomials Multiply a monomial and a polynomial
Solid Figures 7th Grade Standard
solve the following problem...
2008/09/24: Lecture 6b CMSC 104, Section 0101 John Y. Park
The while Looping Structure
2008/11/12: Lab 5/Lecture 17 CMSC 104, Section 0101 John Y. Park
VOLUME.
Objective - To identify how perimeter and area relate.
2.2 Multiply Polynomials Multiply a monomial and a polynomial
Trial and Improvement 100 cm2 Example
Factoring to Solve Quadratic Equations
The while Looping Structure
Day 168 – Cubical and cuboidal structures
Algorithms, Part 3 of 3 Topics In-Class Project: The Box
Solutions to In-Class Problems
Algorithms Practice Topics In-Class Project: Tip Calculator
Question One Boxed In Question Two 25cm2 12cm2
Functions, Part 4 of 4 Topics: Coding Practice Reading: None
6.4 Solving by Factoring.
Photoshop: Image size and resolution
Functions, Part 3 of 3 Topics: Coding Practice Reading: None
UMBC CMSC 104 – Section 01, Fall 2016
Use the Chain Rule to find {image} {image}
Mod 28 F.
Mod 38 F.
Area and Volume How to … Calculate the area of a square or rectangle
Algorithms, Part 3 of 3 Topics In-Class Project: Tip Calculator
Functions, Part 3 of 4 Topics: Coding Practice Reading: None
Area of combined shapes
Presentation transcript:

CMSC 104, Version 9/01 1 Functions, Part 3 of 3 Topics: Coding Practice o In-Class Project: The Box o In-Class Project: Drawing a Rectangle Reading: None

CMSC 104, Version 9/01 2 Coding Practice Let’s take the algorithms that we developed in “Algorithms, Part 3 of 3”, modularize them, and code them.

CMSC 104, Version 9/01 3 The Box Problem: Write an interactive program to compute and display the volume and surface area of a box. The program must also display the box dimensions. Error checking should be done to be sure that all box dimensions are greater than zero.

CMSC 104, Version 9/01 4 The Box - Pseudocode Display “Enter the height: “ Read While ( <= 0 ) Display “The height must be > 0” Display “Enter the height: “ Read End_while

CMSC 104, Version 9/01 5 The Box - Pseudocode (con’t) Display “Enter the width: “ Read While ( <= 0 ) Display “The width must be > 0” Display “Enter the width: “ Read End_while

CMSC 104, Version 9/01 6 The Box - Pseudocode (con’t) Display “Enter the depth: “ Read While ( <= 0 ) Display “The depth must be > 0” Display “Enter the depth: “ Read End_while

CMSC 104, Version 9/01 7 The Box - Pseudocode (con’t) = X X = X = 2 X ( + + )

CMSC 104, Version 9/01 8 The Box - Pseudocode (con’t) Display “Height = “, Display “Width = “, Display “Depth = “, Display “Volume = “, Display “Surface Area = “,

CMSC 104, Version 9/01 9 Drawing a Rectangle Problem: Write an interactive program that will draw a solid rectangle of asterisks (*). The program must also display the dimensions of the rectangle. Error checking must be done to be sure that the dimensions are greater than zero.

CMSC 104, Version 9/01 10 The Rectangle - Pseudocode Display “Enter the height: “ Read While ( <= 0 ) Display “The height must be > 0” Display “Enter the height: “ Read End_while

CMSC 104, Version 9/01 11 The Rectangle - Pseudocode (con’t) Display “Enter the width: “ Read While ( <= 0 ) Display “The width must be > 0” Display “Enter the width: “ Read End_while

CMSC 104, Version 9/01 12 The Rectangle - Pseudocode (con’t) Display “Height = “, Display “Width = “, Skip a line

CMSC 104, Version 9/01 13 The Rectangle - Pseudocode (con’t) = 1 While ( ) = 1 While ( ) Display “*” = + 1 End_while Place cursor on next line = + 1 End_while