Skip to content

Instantly share code, notes, and snippets.

View primaryobjects's full-sized avatar

Kory Becker primaryobjects

View GitHub Profile
@primaryobjects
primaryobjects / quiz4.txt
Last active April 1, 2021 01:45
Finance for Non-Finance Professionals Week 3 Quiz 2
1.
Question 1
An increase in net working capital means
1 point
An increase in cash
### A decrease in cash
@primaryobjects
primaryobjects / quiz3.txt
Created April 1, 2021 01:31
Finance for Non-Finance Professionals - Week 3 Quiz 1
1.
Question 1
Machine A costs $5,000 and depreciates on a 4-year schedule. Machine B costs $4,000 and depreciates on a 5-year schedule. Which machine has a higher Net Fixed Asset value on the Balance Sheet in year 1?
1 / 1 point
### Machine A
Machine B
@primaryobjects
primaryobjects / quiz2.txt
Created March 25, 2021 01:11
Finance for Non-Finance Professionals - Week 2 Quiz 2
Which project would you select based on NPVs assuming the same 5%
discount rate for both? Project A requires an initial outlay of $1,000 and
provides an annual income of $500 for 3 years. Project B requires an initial
outlay of $2,000 and yields an annual income of $900 for 3 years.
1 point
#### Project A
@primaryobjects
primaryobjects / quiz1.txt
Created March 25, 2021 00:51
Finance for Non-Finance Professionals - Week 2 Quiz 1
Which project would you select based on NPVs assuming the same 7% discount rate for both? Project A requires an initial outlay of $500 and provides an annual income of $600 for 3 years. Project B requires an initial outlay of $400 and yields an annual income of $700 for 3 years.
1 / 1 point
Project A
#### Project B
Correct
@primaryobjects
primaryobjects / circle.txt
Created March 24, 2021 01:52
Algorithm to draw a circle.
* draw_circle xc, yc, r is 
*
* d := r/2 
*
* x := r 
*
* y := 0 
*
*  
*
@primaryobjects
primaryobjects / quiz1.txt
Last active March 19, 2021 02:09
Finance for Non-Finance Professionals, Week 1 Quiz 1
1. What are the 3 main factors that affect Interest Rates?
War, Recession, Timing
Opportunity Costs, Inflation, Risk
Economic Conditions, Historical Price Trends, Stock Market
>> Opportunity Costs, Inflation, Risk
2. Choose between these prizes if the interest rate is 10%:
@primaryobjects
primaryobjects / fv.js
Last active March 11, 2021 02:19
Future value calculator. FV=PV * ((1+r)^t), FV = future value, PV = present value, r = interest rate, t = compound time
const fv = (pv, r, t) => {
// FV = PV * ((1+r)^t)
return pv * Math.pow(1 + r, t);
}
const interest = (pv, fv, t) => {
// r = sqrt[t](FV / PV) - 1
return Math.pow(fv / pv, 1/t) - 1;
};
@primaryobjects
primaryobjects / tplink-archer-t4u.md
Last active September 3, 2026 16:05
Steps to Install the TP-Link Archer T4U Plus AC1300 USB WiFi Adapter on Linux Mint
@primaryobjects
primaryobjects / wordBreak.js
Last active February 22, 2021 01:42
Word Break dynamic programming and recursive solution in Javascript. https://jsitor.com/J9hk5-EbC
const wordBreak = (input, dict) => {
// Using recursion O(2^n), we check if a prefix is found in the dictionary.
// If so, we recurse to find words in the dictionary through the rest.
// Otherwise, we continue expanding the prefix until a word is found.
// If we reach the end of the string with a match, we return true.
// Base case, an empty string always matches.
if (!input.length) {
return true;
}
@primaryobjects
primaryobjects / candyCrush1.js
Created February 4, 2021 00:32
Candy Crush algorithm on a 1-dimensional array using recursion in javascript. https://jsitor.com/raTzzpkbe
const candyCrush = input => {
let result = '';
// Less than 3 characters, nothing to do.
if (input.length < 3) {
return input;
}
else {
// Remove matches of 3 or more.
let temp = input[0];