From d9ff895c193b684dba1961f71b64fb7f347c4b93 Mon Sep 17 00:00:00 2001 From: nmuchiri Date: Fri, 28 Aug 2020 11:58:18 -0400 Subject: [PATCH 1/2] That was frustrating --- solution.txt | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 solution.txt diff --git a/solution.txt b/solution.txt new file mode 100644 index 0000000..16ead0a --- /dev/null +++ b/solution.txt @@ -0,0 +1,41 @@ +for(let i=0; i<200; i+=2) +console.log(i) + +// Excited Kitten +// I first of all printed out the string 10 times + let loveMe= "Love me, pet me! HSSSSSS!" + let arr = [] +for (let i =0 ; i <= 10; i++) { + arr.push(loveMe) + arr.join(" ") +} +// I was able to achieve the same using console.log(loveMe.repeat(10)) + +// create an array from which the computer will randomly print if i % 2 === 0 +// } + + +//Thermostat +// get a random whole number between 0 and 100 set to variable current temp + let currentTemp= (Math.floor(Math.random() * 100)) +console.log(currentTemp) + + let desiredTemp= 70 +console.log("current temp is " + currentTemp) + +console.log("The current temperature is now " + desiredTemp + 1 )// couldn't get the temp to stop concatenating and do the math + +console.log("The current temperature is now " + currentTemp +- 1 ) + + +//fizzbuzz + for(let i=1; i<=100; i++) + if(i % 15 === 0){ + console.log("fizzbuzz") + }else if (i % 5 === 0){ + console.log("buzz") + }else if ( i % 3 === 0){ + console.log("fizz") + }else{ + console.log(i) + } From 659b8b3b37730bcbcd7aacd556d1a0cf1dcf072c Mon Sep 17 00:00:00 2001 From: nmuchiri Date: Tue, 1 Sep 2020 09:38:31 -0400 Subject: [PATCH 2/2] renamed my file --- solution.txt => naomi.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename solution.txt => naomi.txt (100%) diff --git a/solution.txt b/naomi.txt similarity index 100% rename from solution.txt rename to naomi.txt