conversion factor functions

Slides:



Advertisements
Similar presentations
NoodleBib Create a bibliography, source list, works cited page.
Advertisements

Enter question text... 1.Enter answer text.... Enter question text... 1.Enter answer text...
Compound Interest.
Enter question text... 1.Enter answer text.... Enter question text... 1.Enter answer text...
Python, CGI November 23, Unit 8. So Far We can write programs in Python (in theory at least) –Conditionals –Variables –While loops We can create a form.
Computer Science 1620 Programming & Problem Solving.
Testing a program Remove syntax and link errors: Look at compiler comments where errors occurred and check program around these lines Run time errors:
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 7 – Class Average Application: Introducing.
MAUS Financial Ratio & Diagnostics Software Program The software program is a comprehensive financial tool that will give you a holistic approach to a.
CS 127 Writing Simple Programs.  Stages involved  Analyze the problem  Understand as much as possible what is trying to be solved  Determine Specifications.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (3): MATLAB Environment (Chapter 1)
Effective Rate Of Interest (for investing). Because interest rates are applied in different ways, comparing them can be misleading. A flat rate of 5%
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 5 – Dental Payment Application: Introducing.
Journal: Write an exponential growth equation using the natural base with a horizontal asymptote of y=-2.
Type Conversions Implicit Conversion Explicit Conversion.
Lesson 6. Python 3.3 Objectives. In this lesson students will learn how to output data to the screen and request input from the user. Students will also.
Engr 0012 (04-1) LecNotes script/function comparison scriptsfunctions Show program logic answer “what” questions Show program details answer “how”
Engr 0012 (04-1) LecNotes Engr 0012 (04-1) LecNotes C++ errors/debugging build/compile compiler does not recognize a statement build/compile.
Engr 0012 (04-1) LecNotes ca05 review - problem solving Problem Statement #1: A cable of length l 0 is needed to suspend an object of mass m obj.
Introduction to Engineering MATLAB – 7 Script Files - 2 Agenda Script files continued.
Engr 0012 (04-1) LecNotes script organization General organization for scripts 1. Header 3. Constant definitions 4. Input data/independent variable/parameter.
Math – Solving Problems Involving Interest 1.
Simple and Compound Interest Video: Simple/ Compound InterestSimple/ Compound Interest Video: A Penny a DayA Penny a Day.
Data Types and Conversions, Input from the Keyboard CS303E: Elements of Computers and Programming.
Bellringer Calculate the Simple Interest for #s 1 and 3 and the Total cost for #2. 1.$1800 at 3.2% for 4 years. 2. $17250 at 7.5% for 6 years. 3. $3,650.
Compound & Simple Interest Investment Analysis. You have been given £5000 to invest for 8 years and a number of banks have approached you to offer their.
Engr 0012 (04-1) LecNotes loading data from files >> file_name = input( 'Enter data file name ==> ','s') Enter data file name ==> c:\temp\speed_mpg.dat.
Challenging… Interest Rates and Savings By: Nicole Sandal.
Engr 0012 (04-1) LecNotes Engr 0012 (04-1) LecNotes Contrasting MATLAB with C MATLABC language Workspace - interactive computation No real.
A little PHP. Enter the simple HTML code seen below.
File I/O. I/O Flags Flags are passed to give some information about how the file is to be used. – Read only file – flag=0x0 – Write only file – flag=0x1.
ACC 548 Week 6 Individual Assignment Comprehensive Annual Financial Report Budget Analysis To purchase this material click on below link
Lecture2.
A little PHP.
Matlab Programming for Engineers
CS005 Introduction to Programming
Chapter 3: Variables, Functions, Math, and Strings
Value-Returning Functions
Design & Technology Grade 7 Python
JavaScript Arrays Date
Analyzing Data Using Formulas
Open AvgLoop. It should provide SOME guidance for today’s assignment, but don’t just copy-paste….THINK.
Chapter 7 - JavaScript: Introduction to Scripting
Problem Solving An engineer wants to use a diesel engine to run a pump that pumps 18,000 gallons of water per hour into a tank that is 65 feet above the.
Using Arrays in C Only fixed-length arrays can be initialized when they are defined. Variable length arrays must be initialized by inputting or assigning.
Engr 0012 (04-1) LecNotes
MATLAB Programs Chapter 6 Attaway MATLAB 4E.
working toward a script that will help analyze data
What I Focus On is What I Get!
JavaScript: Introduction to Scripting
Learning Objectives String Class.
Calculating Interest Interest = the cost of ___________
Review Make sure current directory is set properly Create a diary
Chapter 6 Event-Driven Pages
getting a choice from the user
Lessons Vocabulary Access 2016.
LESSON 16-2 Present Value and Annuities
Islamic University of Gaza
Python Basics with Jupyter Notebook
Using Script Files and Managing Data
Chapter 7 - JavaScript: Introduction to Scripting
Chapter 7 - JavaScript: Introduction to Scripting
MATLAB Programs Chapter 6 Attaway MATLAB 5E.
LESSON 16-2 Present Value and Annuities
Compound Interest.
Global Variables Created by assignment statement placed at beginning of program and outside all functions Can be accessed by any statement in the program.
CS 1111 Introduction to Programming Spring 2019
Chapter 7 - JavaScript: Introduction to Scripting
Python Creating a calculator.
Presentation transcript:

conversion factor functions should be simple - not complex ft_to_m: 0.3048 fpminsq_to_mpssq: 0.00008467 min_to_s: 60 convert acc = 325 ft/min/min to m/s/s acc*ft_to_m/min_to_s/min_to_s = 325*0.3048/60/60 = 0.02751666666667 acc* fpminsq_to_mpssq = 325*0.00008467 = 0.027517750000000 = 325*0.0000847 = 0.027527500000000 we want to maintain as much accuracy as possible avoid ROUNDOFF errors Engr 0012 (04-1) LecNotes 08-01

annotating your scripts and functions function [principal, balance, rate, years] = calcinfo( ) % get user input to financial calculation problem % needs: nothing % returns: stuff user entered % ... function [principal, balance, rate, years] = calcinfo( ) % get user input to financial calculation problem % needs: nothing % returns: principal principal invested, $ % balance balance after years, $ % rate annual interest rate, % % years number of years invested, years % ... Engr 0012 (04-1) LecNotes 08-02

display of results is limited will display the text disp( 'A line of text' ) disp( var_name ) will display value of var_name but - only under current format full control of everything - Workshop 5 fprintf('control string', value list) fprintf('\nInvesting a prinicpal of $%12.2f', principal) fprintf('\nfor %6.2f years at %6.3f%%', years, rate) fprintf('\ncreates a balance of $%12.2f', balance) Engr 0012 (04-1) LecNotes 08-03

programming assignment 04 due Wed 24 Sep class activity 08 : ca08_e12(04-1).pdf Engr 0012 (04-1) LecNotes 08-04