1 Algorithms Practice Topics In-Class Project: Tip Calculator In-Class Project: Drawing a Rectangle.

Slides:



Advertisements
Similar presentations
Perimeter and Area.
Advertisements

Chapter 1 Pseudocode & Flowcharts
Session Objectives# 24 COULD code the solution for an algorithm
Chapter 2- Visual Basic Schneider
1 The Competitive Firm in the Long Run. 2 Remember that the long run is that period of time in which all inputs to the production process can be changed.
Computer Science 1620 Programming & Problem Solving.
ALGORITHMS AND FLOW CHARTS 1 Adapted from the slides Prepared by Department of Preparatory year Prepared by: lec. Ghader Kurdi.
Algorithms IV: Top-Down Design
Chapter 1 Pseudocode & Flowcharts
It’s your best friends birthday and you invite him and a group of friends to Chili’s. The restaurant bill was $42 dollars. The waiter treated you really.
Prerequisite Skills VOCABULARY CHECK ANSWER 24.5 in The area of the rectangle is ?. 2. The perimeter of the rectangle is ?. 3. The opposite of any.
Algorithms A Central Heating system Start Is temp <19
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.
Do Now. Homework Solutions 1)c 2 – 26c – 56 = 0 (c – 28)(c + 2) = 0 {-2, 28} 2)n 2 + 4n – 32 = 0 (n + 8)(n – 4) = 0 {-8, 4} 3)h 2 + 2h – 35 = 0 (h + 7)(h.
Tables and Functions #42.
Applications of Percent
5.4 Applications of Percent
Pseudocode algorithms using sequence, selection and repetition
Problem Solving with the Sequential Logic Structure Lesson 5 McManusCOP10061.
Surface Area and Volume
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.
Software Life Cycle What Requirements Gathering, Problem definition
Design Recipe Team Challenge! 1)Every team submits their answer in writing. 2)Every team can gain points for every question. 3)Wrong answers are worth.
Java course. Assignment #2, due: Feb. 27, (20) (a) Tell the difference between the abstract class and the interface. (b) Tell the difference between.
EXAMPLE 1 Identify similar solids Tell whether the given right rectangular prism is similar to the right rectangular prism shown at the right. a. b.
Pseudocode Algorithms Using Sequence, Selection, and Repetition
Pseudocode Algorithms Using Sequence, Selection, and Repetition Simple Program Design Third Edition A Step-by-Step Approach 6.
Chapter 1 Pseudocode & Flowcharts
Warm Up Warm Up Lesson Presentation Lesson Presentation Problem of the Day Problem of the Day Lesson Quizzes Lesson Quizzes.
CSCI-100 Introduction to Computing
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.
EXAMPLE 4 Solve a Multi-Step Problem SOLUTION STEP 1Find the amount of the tip. Your food bill at a restaurant is $24. You leave a 20% tip. The sales tax.
Algorithms, Part 3 of 3 Topics In-Class Project: The Box
An Introduction to Programming with C++ Sixth Edition
Day 5: More Practice Unit 7: Quadratic Word Problems.
CALCULATING RETURN ON INVESTMENT (ROI) 1. What is your total percentage return on investment if you buy a stock for $50, sell it for $55 and received a.
Squared and Cubed Conversion Factors
Algebra 1 Section 2.6 Use the distributive property Combine similar terms Note: 7(105) = 735 Also 7(100+5) 7(100) + 7(5) = 735 3(x+2) 3x + 3(2)
Perimeter, Area and Volume Presented by Bill Haining Functional Skills L1.
Revenue = (# of Calculators ) * ( price )
2008/09/22: Lecture 6 CMSC 104, Section 0101 John Y. Park
2.2 Multiply Polynomials Multiply a monomial and a polynomial
4.7 Modeling and Optimization
1 3 2 Maths 3:Perimeter, Area and Volume By: Bill Haining.
Chapter 1 Pseudocode & Flowcharts
2008/11/12: Lab 5/Lecture 17 CMSC 104, Section 0101 John Y. Park
Week 2 – Basic Constructs 1
Objective - To identify how perimeter and area relate.
2.2 Multiply Polynomials Multiply a monomial and a polynomial
Pseudocode & Flowcharts
Pseudocode algorithms using sequence, selection and repetition
Chapter 1 Pseudocode & Flowcharts
Chapter 2- Visual Basic Schneider
ME 142 Engineering Computation I
Algorithms, Part 3 of 3 Topics In-Class Project: The Box
Solutions to In-Class Problems
Algorithms Practice Topics In-Class Project: Tip Calculator
Exercise Solution First questions What's output What's input
Functions, Part 4 of 4 Topics: Coding Practice Reading: None
Chapter 2 Control Structures.
SPLITTING OF COMBINED SHAPES
Functions, Part 3 of 3 Topics: Coding Practice Reading: None
UMBC CMSC 104 – Section 01, Fall 2016
Warm Up Problem of the Day Lesson Presentation Lesson Quizzes.
Mod 28 F.
Chapter 1 Pseudocode & Flowcharts
Algorithms, Part 3 of 3 Topics In-Class Project: Tip Calculator
Functions, Part 3 of 4 Topics: Coding Practice Reading: None
Revenue = (# of Calculators ) * ( price )
Tables and Functions #31.
Presentation transcript:

1 Algorithms Practice Topics In-Class Project: Tip Calculator In-Class Project: Drawing a Rectangle

2 Writing Algorithms from Scratch Given a problem statement, we are going to write the corresponding generic algorithm for the solution. We will use the following procedure: Determine the algorithm inputs and outputs Develop the pseudocode

3 Tip Calculator Problem: Write an interactive program to calculate the dollar amount of tip on a restaurant bill given the percentage of tip. You should allow for changes in the total price of the bill and the tip percentage. Error checking should be done to be sure that the amount of the bill is greater than 0.

4 Drawing a Rectangle Problem: Write an interactive program that will draw a solid rectangle of asterisks (*). You should allow for changes in the height and width of the rectangle. Error checking must be done to be sure that the dimensions are greater than zero.