Programming games Drawing logo. Expressions. Formulas. Credit cards. Form validation. Homework: your credit card program. Continue uploading work.

Slides:



Advertisements
Similar presentations
Chapter 7: Planned Borrowing. Objectives Discuss the elements of the planned use of credit. Establish your own debt limit. Understand the language of.
Advertisements

Your Money and and Your Math Chapter Credit Cards and Consumer Credit
Do now – grab a calculator
CHAPTER 9 SEC 3 Consumer Loans. What is a consumer loan? Def.  a loan that establishes consumer credit that is granted for personal use; usually unsecured.
Chapter 9 sec 2.  How many of you have a savings account?  How many of you have loans?  What do these 2 questions have in common?
Time Value of Money Introduction. TVM Preferences More vs. Less Sooner vs. Later More Now vs. Less Later Less Now vs. More Later ????
McGraw-Hill © 2004 The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Discounted Cash Flow Valuation Chapter 5.
Discounted Cash Flow Valuation
TOPIC TWO: Chapter 3: Financial Mathematics By Diana Beal and Michelle Goyen.
Unit 6: Credit Section 3: Make Credit Work for You.
(c) 2001 Contemporary Engineering Economics 1 Chapter 11 Understanding Money and Its Management Nominal and Effective Interest Rates Equivalence Calculations.
Multiple Cash Flows –Future Value Example 6.1
HOW CREDIT CARDS WORK What you need to know about credit cards- including what credit cards companies can and can’t do, and what information they have.
© 2003 The McGraw-Hill Companies, Inc. All rights reserved. Discounted Cash Flow Valuation (Formulas) Chapter Six.
Chapter 7 Pre-Algebra.
Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 3: Primitive Data Types.
Chapter McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. 6 Discounted Cash Flow Valuation.
Payday Loans & Credit Cards CENTS. What is a Payday loan?  A Payday loan is a small loan, also known as a “cash advance.” These loans typically become.
CHAPTER 6 Discounted Cash Flow Valuation. Key Concepts and Skills Be able to compute the future value of multiple cash flows Be able to compute the present.
5-1 McGraw-Hill/Irwin Copyright © 2011 by the McGraw-Hill Companies, Inc. All rights reserved.
Slide 1 Copyright © 2015, 2011, 2008 Pearson Education, Inc. Percent and Problem Solving: Interest Section7.6.
Interest Rates 4C Math Unit B – Credit Cards, etc.
6-0 Week 3 Lecture 3 Ross, Westerfield and Jordan 7e Chapter 6 Discounted Cash Flow Valuation.
Programming Games Computer science big ideas. Computer Science jargon. Show virtual dog Homework: [Catch up: dice game, credit card or other form.] Plan.
6-0 Effective Annual Rate (EAR) 6.3 This is the actual rate paid (or received) after accounting for compounding that occurs during the year If you want.
Credit Cards Did you know that 183 million Americans are using credit cards? Average credit card debt is ~ $7,100 per household in 1012.
Section 4C Loan Payments, and Credit Cards Pages C.
SIMPLE AND COMPOUND INTEREST Since this section involves what can happen to your money, it should be of INTEREST to you!
Chapter 9: Mathematics of Finance
Chapter 4 The Time Value of Money
KU122 Unit 4 Seminar Percent Notation KU Introduction to Math Skills and Strategies Seminars: Wednesdays at 8:00 PM ET Instructor: Tammy Mata
Finance 2009 Spring Chapter 4 Discounted Cash Flow Valuation.
LSP 120: Quantitative Reasoning and Technological Literacy Topic 9: Financial Mathematics Loans and Credit Cards Prepared by Ozlem Elgun1.
What is Your Interest? Discover the impact and power of interest.
Interest on Loans Section 6.8. Objectives Calculate simple interest Calculate compound interest Solve applications related to credit card payments.
Credit Cards and Consumer Loans
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 10 The Mathematics of Money 10.1Percentages 10.2Simple Interest.
Homework: Finish dice game.
The Study of Money Simple Interest For most of your financial plans, throughout your life, there will be two groups involved. The Bank The Individual.
Chapter 31 The Cost of Credit. Interest Calculations - Determining Factors  Interest Rates – The percentage that is applied to your debt expressed as.
5 Minute Check Find the price to the nearest cent. Complete on the back of your homework. 1. $60; with a 60% discount 2. $40; with 7% tax 3. $199; with.
Programming Games Formulas. Date. Representation in [computer] Storage. Credit Card. Homework: Finish slide show. Upload application.
Aim: Money Matters – Effective Rate & APR Course: Math Literacy Aim: How does money matter? The lowdown on interest rates. Do Now: Annie deposits $1000.
Chapter 5 Section 5.1 Simple Interest. The Mathematics of Finance In these sections we will learn about of the more practical uses of mathematics that.
Multiple/Continuous Compounding. Understand Effective Interest Rates Figure out how to use Inflation/Deflation in your decisions.
Exponents and Exponential Functions
Ch 4: Introduction to Time Value of Money Dr. Yi.
Amortized Loans An amortized loan is a loan paid off in equal payments – consequently, the loan payments are an annuity. In an amortized loan:
Charge It Right. 2 You Will Know  The characteristics of a credit card  The costs of using a credit card  The potential problems with credit card use.
Quick Quiz – Part 1 Suppose you are looking at the following possible cash flows: Year 1 CF = $100; Years 2 and 3 CFs = $200; Years 4 and 5 CFs = $300.
Using Credit SSEPF4.a, SSEPF4.b, SSEPF4.c. Loans and Credit Cards: Buy Now, Pay Later The U.S. economy runs on credit. Credit – The ability to obtain.
Personal Finance Mrs. Rinehart. Rinehart’s Recap Go to my website and copy and paste these statements into your recap. 1 - Money doesn’t buy happiness.
Section 4A The Power of Compounding Pages
Programming Games Credit cards. Forms. Homework: Catch up: dice game. Produce your own credit card application or something else making use of a form with.
PRE-ALGEBRA. Lesson 7-7 Warm-Up PRE-ALGEBRA Simple and Compound Interest (7-7) principal: the amount of money that is invested (put in to earn more)
Topic 2 Proportional Reasoning with Percents Percent of a Number To find the percent of a number, you can: write the percent as a fraction and.
Programming Games Logic. Slide show. Range input. Storage. Datatypes. Binary numbers. Homework: Catch up. This includes uploading projects to your server.
(The Nightmare Continues…).  Open-Ended Installment Loans differ from Fixed Installment Loans in a number of ways: ◦ They are often referred to as “revolving.
Simple and Compound Interest For most of your financial plans, throughout your life, there will be two groups involved. The Bank The Individual.
Grade 12 Family Studies.  Do you have a credit card?  What is it used for?  How is it like a loan?
HAWKES LEARNING Students Count. Success Matters. Copyright © 2015 by Hawkes Learning/Quant Systems, Inc. All rights reserved. Section 9.4 Borrowing Money.
NEFE High School Financial Planning Program Unit 4 – Good Debt, Bad Debt: Using Credit Wisely Good Debt, Bad Debt: Using Credit Wisely.
All About Credit. Using Credit Credit allows people to purchase goods and services that they can use today and pay for those goods and services in the.
Chapter 4, Section 2 Credit Card Finance Charges.
Simple and Compound Interest Unit 4 - Investing. Determining Simple Interest I = p * r * t Interest = Principle X Rate X Time ( in years)
Practical Math: Credit Cards Chapter 7 Notes. Vocabulary credit card: a card that allows you to buy items now and pay later monthly statement: form like.
Vms Year 9 Mathematics Percentages.
Chapter 3. Understanding Money Management. 2 Chapter 3 Understanding Money Management Nominal and Effective Interest Rates Equivalence Calculations using.
1. What is the order of magnitude difference between an inch and a mile? between an inch and a mile? 2. How many times bigger is a mile compared to an.
LSP 120: Quantitative Reasoning and Technological Literacy
Presentation transcript:

Programming games Drawing logo. Expressions. Formulas. Credit cards. Form validation. Homework: your credit card program. Continue uploading work.

HTML5 logo html5/html5logoscale.htmlhttp://faculty.purchase.edu/jeanine.meyer/ html5/html5logoscale.html Examine code Divide up code: each group explains section.

Formulas Mathematical expressions are combinations of operators and terms –examples of operators: +, -, *, /, ==, ===, !=, &&, … –examples of terms: variable name, constant Programming languages have features for expressing mathematical formulas distance = velocity x time Code, assume distance, velocity, time all variables distance = velocity * time; multiplication === checks for datatype & value

Function expressing formula function distance (velocity, time) { return velocity * time; } Give me velocity and time and I'll [the function] will return the distance. The function header indicates the [incoming] parameters (aka arguments). NOTE: in many languages, the function header also indicates the datatype of each parameter and the datatype of the returned value. This makes it possible to check that the programmer is NOT using the functions incorrectly…at least as far as datatype.

Temperature conversion Temp fahrenheit = Temp centigrade *(9/5)+32; Check by putting in points for boiling: 212 Fahrenheit and 100 Centigrade For freezing 32 Fahrenheit and 0 Centigrade What is formula for… the other direction?

Caution Recall: Programming systems store whole numbers (0, 1, 2, -10, etc.) differently than numbers with fractions (0.5, 10.23, , etc.) Need to make sure that none of the intermediate steps are truncated to whole numbers! –One approach: write 9.0 and 5.0 and 32.0 –Note: problems occurs with the division, not multiplication or addition

Precedence Many programming courses start off with rules of precedence a*b+c Is evaluated as (a*b)+c. The multiplication is done first The alternative is a* (b+c) Recommendation: put in parentheses! MAYBE: avoid long statements—use multiple lines

Conditionals Suppose a formula (for ticket price or score or …) involves a conditional test: –One Tuesdays, drinks are half price Logic: if it is Tuesday, dcost =.5*dcost; Implementation: use if statement –Alternative: conditional operator. Show later. But how do we know if it is Tuesday? Implementation: use Date –Remember from first HTML example!

Date code Suppose policy of half-price on Tuesdays today = new Date(); dayofweek = today.getDay(); //encoding is 0 for Sunday, 1 for Mon., // 2 for Tuesday if (dayofweek==2) { dcost =.5 * dcost; }

Conditional operator Operator with 3 operands condition ? value_if_true : value_if_false … dcost = (dayofweek==2) ? (.5*dcost) : dcost; Comfortable_with_conditional ? Use_It : if_statement

A man walks into a bar… See also: creditcard.html creditcard.html Notes: credit.doc credit.doc

Credit cards!!!! Calculation (as indicated by code) balance = old_balance + purchases Subtract the payment: balance = balance – payment Compute interest Divide ANNUAL interest by 12. REMEMBER DECIMAL POINT balance = balance + (balance * interest) Add fee if required: balance = balance + fee

Estimating 24% ANNUAL interest is 2% per month –24/12 is 2! What is 2% of $50? –2% of 100 is 2. So…2% of 50 would be 1 –What is 10% of 50? 5, so 2% would be less than that 15% ANNUAL interest. Monthly would be…more than 1 less than 2 (1.25)

Compounding The interest is added to what you owe. The new balance is what you haven't paid plus the interest on what you haven't paid. Next month, you will be paying interest on the interest. This doesn't include fees for not paying the minimum My program does not do compounding on a daily basis. Actual rules mean you pay more! NOTE: it still is a free loan if you pay off balance. –There are charges to merchants.

Compounding is your friend, when you are saving (or investing) –You earn interest and then interest on the interest. is your enemy if you owe money Interests are very low now, but they (probably) will rise!

Describe 3 mistakes in the following code for calculating days in the month switch(mon { case “Sep”: case “Apr”: case “Jun”: case “Nov”: daysInMonth = “This month has 30 days.”; case “Feb”: daysInMonth = “This month has 28 days.”; break; default: daysInMonth = “This month has 31 days.”; }

Classwork/homework Prepare your own [simplified] credit card calculator Do something original –use pictures. –Look up how to specify input to be numbers and within limits and use this for the input fields. –?????