Coding
Final Project MAT 105 Quantitative Skills for Business
By popular vote, we have done some programming the last week...
SFO1
SFO 2
We will still do some review of math...
Computer scientists, data scientists/analysts, mathematicians, engineers, all work together, and in general to rise to the top of any of these fields, you will have some knowledge of all of them
To manage and work with the above people, it is also important you have a keen understanding of what they do. Roles like, product manager, project manager, marketing manager, require individuals to be competent about technical concepts and procedures, and to be able to communicate between teams
So far we’ve seen….
print statements
data types (strings, ints, floats)
if/elif/else statements
while loops
for loops
graphing
There is still a lot to learn
We offer several courses here in coding, look out for them in Spring 2020
Email me if you’d like to chat more about developing your skills
This semester...
In this course we covered:
Linear
Exponential
Logarithmic
Quadratic
Rational
...functions, equations and their applications. Since we are living in the age of automation, let’s automate some of our tasks from this semester.
The Final Project
● 6 Parts total ● 10 points per part = 60 points ● Full credit for code that runs and meets requirements ● Partial credit for syntax errors, but logical code requirements met
● Interest Calculator (2 parts) ● Quadratic Formula Calculator (1 part) ● Rational Functions “Work-together problems” and “Average cost” (2 parts) ● Graphing (1 part)
● Due: April 25 at 11:59 pm ● Submit a .py file to Assignments > Final Project
1.Interest Calculator
Compares simple interest (linear) with continual compounding growth, n (n=12 and 365) number of compoundings growth, annual compounding (exponential). The user should input any value for P, r, t, and the computer should output the final balance for all the above.
example output: Simple interest gives XXXX dollars Annual compounding interest gives XXXX dollars 12 compounds gives XXXX dollars 365 compounds gives XXXX dollars Continual compounding gives XXXX dollars
2. Interest Calculator “Time to wait”
● Assume that you have $X and you want to invest it. The bank offers you a r% interest annually.
● Write another function that tells you how many years do you have to wait to get $Y.
● User should input X,Y, and r ● Output is the number of years to get the desired Y value ● Hint: you don’t need to use a log to solve this– think of the while loop
instead
3. Quadratic Formula calculator
Finds the x-intercepts of a quadratic function given a, b, and c, values for the function given in standard form.
Standard form of a quadratic function is ! = #$% + '$ + ( The quadratic equations to find x-intercepts is $ = )*± *
,)-./ %.
Remember you can have 0,1, or 2 x-intercepts.
Zero intercepts One intercept Two intercepts
3. Quadratic Formula calculator
To find the number of roots the program should first, find the determinant
!" − 4%& Then consider these cases !" − 4%& > 0 2 x-intercepts
!" − 4%& = 0 1 x-intercept
!" − 4%& < 0 0 x-intercepts
3. Quadratic Formula calculator
example output:
This function has (0, 1, or 2) x-intercepts.
(If the function has intercepts, print where they are)
They are at (X,0) and (Z,0).
4. “Work-together” problems (rational)
User should input two different times for person A and B to complete the same task. The output will tell the time it took for them to work together.
example output: Person A completes the task in 4 hours Person B completes the task in 6 hours Person A and B complete the task together in 2.4 hours
5. Average Cost Calculator (rational)
● Suppose you buy 2 products for A and B dollars. They each cost C dollars annually to maintain. They last, D and E years, respectively.
● Write a function to tell you the average cost of each. ● Inputs: A,B,C,D,E ● Outputs: Average cost of each product
6. Graphing
● Create and display 1 graph for each of the functions below ● You may select any values you want for the constants below: ● y=mx+b ● y=A*Bx ● y=Pert ● y=ax2+bx+c ● y= !"#$ + &