Skip to content

Instantly share code, notes, and snippets.

View NullJason's full-sized avatar
🐦‍⬛
Nothing Much Going on, Invite me😊!

Jason NullJason

🐦‍⬛
Nothing Much Going on, Invite me😊!
View GitHub Profile
@NullJason
NullJason / README.md
Last active February 6, 2024 21:59 — forked from 101arrowz/README.md
mcgraw downloader fork (zip ver.)

this is a very tiny edit to the downloader, just makes the extention a .zip file instead: words are pasted into the s9ml folder

If you purchase a textbook from McGraw Hill, the website to view it is clunky and only works on some devices. You can't go to specific page numbers, the search is super slow, etc. That's why (101arrowz) wrote this script to download the textbook as an ePub file for your own viewing.

Using this script is 100% legal. McGraw Hill publicly hosts their ebooks online in order for their web client to download it. Moreover, to use it, you must already have purchased the book you would like to download, so it is legally yours to use as you please. However, it IS illegal to use this for piracy purposes. DO NOT DISTRIBUTE ANY TEXTBOOKS YOU DOWNLOAD USING THIS SCRIPT.

console.log("hello, hi, goodbye");
// An unsolved problem in mathematics, in 12 lines of code.
// Rule: even numbers get halved; odd numbers become 3n + 1.
// Every starting number ever tried eventually reaches 1 —
// but nobody has been able to prove it always does.
let n: number = 67;
let steps: number = 0;
while (n !== 1) {
if (n % 2 === 0) {
n = n / 2;
} else {
//PART1
let statement1: string = "I am capable of swimming.";
let statement2: string = "I love traveling.";
let statement3: string = "My hobbies include baking.";
console.log("Two truths and a lie:");
console.log("1. " + statement1);
console.log("2. " + statement2);
console.log("3. " + statement3);
let theLie: number = (16 * 20 + 3) % 3;
// total cost is a*b
// tickCont should be int literal
// missing $
let ticketPrice: number = 12;
let ticketCount: number = 3;
let totalCost: number = ticketPrice * ticketCount;
console.log("Tickets: " + ticketCount);
console.log("Total: $" + totalCost);
let discountedCost: number = totalCost * 0.75;
console.log("With student discount: $" + discountedCost);
// PREDICTION: i predict that the prices will be swapped correctly, laptop will be $1200 and phone will be $650.
// for shifts, should only need one temp var.
let laptopPrice: number = 650;
let phonePrice: number = 1200;
let tabletPrice: number = 300;
let temporaryHolder: number = laptopPrice;
laptopPrice = tabletPrice;
tabletPrice = phonePrice;
phonePrice = temporaryHolder;
/* Predict:
hour 1 - 2 cells
h2 - 4 cells
h3 - 8 cells
h4 - 16 cells
each iteration duplicates cellcount.
*/
let cellCount: number = 5;
/* Predict:
40, 20, 10, 5, 2, 1
0, 1, 2, 3, 4, 5
*/
// A knockout tournament: each round, half the players are eliminated
// (odd player out sits the round). How many rounds until a winner?
let playersLeft: number = 1000;
let roundsPlayed: number = 0;
while (playersLeft > 1) {
/* Predict:
0+1=1 1+1=2.
the growth of vine is the previous two added, n-1+n-2, which is basically fibonacci
*/
// A vine's new growth each week equals the total of the previous
// two weeks' growth. Week 0 grew 0 cm, week 1 grew 1 cm.
let lastWeekGrowth: number = 0;
let thisWeekGrowth: number = 1;
for (let week = 1; week <= 5; week++) {
let sumlimit:number = 100;
let total:number = 0;
for(let i = 1; i<=sumlimit; i++){
if (i%2===0) total += i
}
console.log(total)