From 75490c0e4f1883c44da98b54707855d8a4b83320 Mon Sep 17 00:00:00 2001 From: Jeffrey Dunaway Date: Mon, 24 Oct 2022 22:15:34 -0700 Subject: [PATCH] Main --- class-1-exercises-jeffreydunaway-master.zip | Bin 0 -> 1915 bytes .../Class 1 Exercises.html | 17 +++ .../Class 1 Exercises.js | 50 +++++++++ .../README.md | 1 + ...JavaScript_Jeffrey_Dunaway_Assignment_1.js | 97 ++++++++++++++++++ 5 files changed, 165 insertions(+) create mode 100644 class-1-exercises-jeffreydunaway-master.zip create mode 100644 class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/Class 1 Exercises.html create mode 100644 class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/Class 1 Exercises.js create mode 100644 class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/README.md create mode 100644 class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/UWC2_JavaScript_Jeffrey_Dunaway_Assignment_1.js diff --git a/class-1-exercises-jeffreydunaway-master.zip b/class-1-exercises-jeffreydunaway-master.zip new file mode 100644 index 0000000000000000000000000000000000000000..572a773a845e83ba4c100bec91c829724c57f12c GIT binary patch literal 1915 zcmWIWW@h1H0D%khf%E0&{%|AH+Y8(gHxOLg?t;>MMaWgV7*pXnIGss#6Lj_luwR#yP zxjAr4a{CYRH5mxFy#L!Zm48Fy=UdzvCKDZ|bi3=AUJ3EqrFwDy_5lA^nMS+wH*Mab zwQA4KE733h9_DBZY+AKVn1^BSH@D6^TU;g_`nGb;l_eaNF$PZrQ!BRK&F=iNa)p~| z!xrYq#ShYCZ=CF(%wHfi(dSBK!OcfY-X7|FR?_nM--c`l<#;!Fqa&xo>Mo{!WLJCn znHU&2Ss55?C<=dy4iTl1C{-ip0rt0i1 zQzt~+Oiw#Er}&P&#ft-sF+O>IFZbVn`Q>-OlMk-C-mAB4TM(|LV|eKHqgp$;!-v=d z0($1j)jOt^TeF^$+$FPr*Pjb<&+feY?WMXw@Di6JYY3C`((ni3H4+;ck0-m8Hyds1 z+wiqCGoddi?ADA64qL2S$`gvubRLraWm1;Rd-sfd!j0D)zZ3smcX^xK#KnAMzNs(! z>sbe#9G=OUmoAps=lXhDQ0YRUh0nIH2xbeNtMF6x66^crdmTH@g^8-^`PleQU3%ZG z;)AKJZ6OKly=bGlOd)i1xie)Fs8ocXcm z;(pgT{Zmnyc5qdt=eEt^+|o(ALbA^+2>Gpl?6`=)g?X$Oz&WkOOOL7e}NOU-T?fbvmktMY^XNkYt zW)pu(QmKi<>(+_g9A=4=mu=zK$v(I0K`ob;`o{o^rsPT84w;i=Z%vJ8zNS~1x4fi6 zW#)!+5B^?lx-m8Ez3oe8NvYSBmmjDK%s;QUyr9^sxqI`=FEwnJPx=b;ysCI=ah>tc zH9_gDLtCz0lTgaeSgdF6SJu1N?5fk9&$B0pZ~e;Dqf~WK|JUJz1q{sxC;n-<@o@ig zmeemhzn4ELJvs52fz#CQV0?!()y}P*%8A!O5 z&tIgM)V?h%NzX~}BO?pzbfrnB=bK$nTk6Sr|DF$@-n!>C?dv1WrVGZT#g=VP6ss-k z-n`Aux|+AYRQ$07U+B^*!9!2}25d7c+pIHHepQP?+o|RIHms{)ojS`&(8)l!t;vOL zM#zmf7Wa~sdec~VmUV3Ey|m$~g27^`rLB(DXAFa493U}SK&v$b9{Zty}t8lH!w69fn@~l@)%My3qVU~GD>Hd@z~2}kh#E+ z2LgW}Cf0ZYr8UA&5KGZZLXdS3OQV1k`IaJ;i|AIOCo6=N4J^c4iJ8a(yjj^mX0ZU_ zdZ6R`fQ7pTLz=loqN!<8nsK68l6g{UYKp0;WvYd-v4v%dv4yFjp;?NFg}H%&DF6pH B^q&9# literal 0 HcmV?d00001 diff --git a/class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/Class 1 Exercises.html b/class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/Class 1 Exercises.html new file mode 100644 index 00000000..95f836d3 --- /dev/null +++ b/class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/Class 1 Exercises.html @@ -0,0 +1,17 @@ + + + + + Class 1 Exercises + + + +

Open console for output

+

PC

+ CTRL SHIFT i +

or Mac

+ CMD SHIFT i + + + + \ No newline at end of file diff --git a/class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/Class 1 Exercises.js b/class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/Class 1 Exercises.js new file mode 100644 index 00000000..339e3569 --- /dev/null +++ b/class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/Class 1 Exercises.js @@ -0,0 +1,50 @@ +/** + * MATH + */ + +// 1. Pagliacci charges $16.99 for a 13” pizza and $19.99 for a 17” pizza. +// What is the area for each of these pizzas? +// (radius would be the listed size - i.e. 13" - divided by 2) + + +// 2. What is the cost per square inch of each pizza? + + +// 3. Using the Math object, put together a code snippet +// that allows you to draw a random card with a value +// between 1 and 13 (assume ace is 1, jack is 11…) + + +// 4. Draw 3 cards and use Math to determine the highest +// card + + +/** + * ADDRESS LINE + */ + +// 1. Create variables for firstName, lastName, +// streetAddress, city, state, and zipCode. Use +// this information to create a formatted address block +// that could be printed onto an envelope. + + +// 2. You are given a string in this format: +// firstName lastName(assume no spaces in either) +// streetAddress +// city, state zip(could be spaces in city and state) +// +// Write code that is able to extract the first name from this string into a variable. +// Hint: use indexOf, slice, and / or substring + + +/** + * FIND THE MIDDLE DATE + */ +// On your own find the middle date(and time) between the following two dates: +// 1/1/2020 00:00:00 and 4/1/2020 00:00:00 +// +// Look online for documentation on Date objects. + +// Starting hint: +const endDate = new Date(2019, 3, 1); diff --git a/class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/README.md b/class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/README.md new file mode 100644 index 00000000..3b7fbe67 --- /dev/null +++ b/class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/README.md @@ -0,0 +1 @@ +[![Open in Visual Studio Code](https://classroom.github.com/assets/open-in-vscode-c66648af7eb3fe8bc4f294546bfd86ef473780cde1dea487d3c4ff354943c9ae.svg)](https://classroom.github.com/online_ide?assignment_repo_id=8978189&assignment_repo_type=AssignmentRepo) diff --git a/class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/UWC2_JavaScript_Jeffrey_Dunaway_Assignment_1.js b/class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/UWC2_JavaScript_Jeffrey_Dunaway_Assignment_1.js new file mode 100644 index 00000000..7a8b5de7 --- /dev/null +++ b/class-1-exercises-jeffreydunaway-master/class-1-exercises-jeffreydunaway-master/UWC2_JavaScript_Jeffrey_Dunaway_Assignment_1.js @@ -0,0 +1,97 @@ +/** + * MATH + */ + +// 1. Pagliacci charges $16.99 for a 13” pizza and $19.99 for a 17” pizza. +// What is the area for each of these pizzas? +// (radius would be the listed size - i.e. 13" - divided by 2) + +const radius_Pizza_1 = (13/2) +const radius_Pizza_2 = (17/2) + +// 2. What is the cost per square inch of each pizza? + +function areaOfPizza() { + let Pizza1 =(Math.PI / radius_Pizza_1 **2) +let Pizza2 = (Math.PI / radius_Pizza_2 **2) +} +console.log(Pizza1) +console.log(Pizza2) + +// 3. Using the Math object, put together a code snippet +// that allows you to draw a random card with a value +// between 1 and 13 (assume ace is 1, jack is 11…) + +let Ace = 1 +let Two = 2 +let Three = 3 +let Five = 5 +let Six = 6 +let Seven = 7 +let Eight = 8 +let Nine = 9 +let Ten = 10 +let Jack = 11 +let Queen = 12 +let King = 13 + +function getRandomIntInclusive (min, max) { + min = 1 + Math.ceil(min); + max = 13 + Math.floor(max) + return + Math.floor(Math.random() * (max - min + 1) + min); + } +} +// 4. Draw 3 cards and use Math to determine the highest +// card + +Math.random() * (max - min + 1) + min) +console.log(Math.max('1, 13')) + +/** + * ADDRESS LINE + */ + +// 1. Create variables for firstName, lastName, +// streetAddress, city, state, and zipCode. Use +// this information to create a formatted address block +// that could be printed onto an envelope. + +const firstName = jeffrey +const lastName = dunaway +const streetAddress = 123 Best Street +const city = Seattle +const state = Washingston +const zipCode = 98101 + + +// 2. You are given a string in this format: +// firstName lastName(assume no spaces in either) +// streetAddress +// city, state zip(could be spaces in city and state) +// +// Write code that is able to extract the first name from this string into a variable. +// Hint: use indexOf, slice, and / or substring + +let fullName = '${firstName} ${lastName}' +let result = text.slice(0,15) +const jeffrey = firstName +console.log(str.substring(1,7) + + + +/** + * FIND THE MIDDLE DATE + */ +// On your own find the middle date(and time) between the following two dates: +// 1/1/2020 00:00:00 and 4/1/2020 00:00:00 +// +// Look online for documentation on Date objects. + +// Starting hint: +const startDate = new Date(2020, 0, 1); +const endDate = new Date(2020, 4, 1); +var midpoint = new Date((date.1getTime() + date2.getTime())/2); +console.log(midpoint) \ No newline at end of file