Algorithms, Part 3 of 3 Topics In-Class Project: Tip Calculator

Slides:



Advertisements
Similar presentations
Chapter 1 Pseudocode & Flowcharts
Advertisements

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 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.
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.
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.
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.
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
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.
Lesson 5 McManus COP  Algorithm Instructions  Sequential Logic Structure  Solution Development McManusCOP10062.
1 Algorithms Practice Topics In-Class Project: Tip Calculator In-Class Project: Drawing a Rectangle.
Algorithms, Part 3 of 3 Topics In-Class Project: The Box
An Introduction to Programming with C++ Sixth Edition
Topic: Control Statements. Recap of Sequence Control Structure Write a program that accepts the basic salary and allowance amount for an employee and.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
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.
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)
CIS 115 AID Teaching Effectively/cis115aid.com FOR MORE CLASSES VISIT
Repetition statements
CIS 115 Slingshot Academy / cis115.com
Output “Funds not available”
2008/09/22: Lecture 6 CMSC 104, Section 0101 John Y. Park
Chapter 2: Input, Processing, and Output
Chapter 2- Visual Basic Schneider
Algorithm development
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Algorithm and Ambiguity
CIS115 Education for Service-- snaptutorial.com
CIS 115Competitive Success/tutorialrank.com
CIS 115 Education for Service-- tutorialrank.com.
CIS 115 Teaching Effectively-- snaptutorial.com
Chapter 1 Pseudocode & Flowcharts
2008/11/12: Lab 5/Lecture 17 CMSC 104, Section 0101 John Y. Park
Week 2 – Basic Constructs 1
Pseudocode & Flowcharts
Pseudocode algorithms using sequence, selection and repetition
Credit Cards UPC Codes.
Chapter 2- Visual Basic Schneider
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
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
Chapter 2 Control Structures.
Practice before a Percentage Change on finding the amount using a
SPLITTING OF COMBINED SHAPES
Chapter 2: Input, Processing, and Output
Basic Lessons 5 & 6 Mr. Kalmes.
Functions, Part 3 of 3 Topics: Coding Practice Reading: None
UMBC CMSC 104 – Section 01, Fall 2016
8-8: Solving More Radical Equations
Chapter 1 Pseudocode & Flowcharts
Functions, Part 3 of 4 Topics: Coding Practice Reading: None
Presentation transcript:

Algorithms, Part 3 of 3 Topics In-Class Project: Tip Calculator In-Class Project: Drawing a Rectangle Reading None

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 Complete the pseudocode

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.

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.