diff --git a/app.js b/app.js new file mode 100644 index 0000000..01fa6fa --- /dev/null +++ b/app.js @@ -0,0 +1,133 @@ +'use strict'; + +let userName = prompt('What is your name?'); +console.log('User\'s name is ' + userName); + +let correctAnswers = 0; + +alert('Hello ' + userName + '! Let\'s see if you can answer these yes/no questions about me. Please type your response as either yes/no or y/n.'); + +//question one +let question1 = prompt('Is Lee a Swing dancer?').toLowerCase(); + +if (question1 === 'yes' || question1 === 'y') { + alert('That\'s right, ' + userName + '! Lee\'s been doing Lindy Hop and other Jazz dances for nine years!'); + correctAnswers++; +} else { + alert('He mentioned this the first day in class during his introduction. Were you listening,' + userName + ' ? :('); +} + +console.log('User\'s response is "' + question1 + '" to question 1.'); + +//question two +let question2 = prompt('Is Lee a smoker?').toLowerCase(); + +if (question2 === 'no' || question2 === 'n') { + alert('That\'s correct, ' + userName + '! Up until about a year and a half ago, he was for the prior 12 years, but he has since quit!'); + correctAnswers++; +} else { + alert('That is a big negatory,' + userName + '. He used to, but does no longer.'); +} + +console.log('User\'s response is "' + question2 + '" to question 2.'); + +//question three +let question3 = prompt('Is Lee playing PokemonGO right now?').toLowerCase(); + +if (question3 === 'yes' || question3 === 'y') { + alert('Most likely. Probably just caught a Pikachu, ' + userName + '. Just kidding. It\'s just a Zubat. Of course.'); + correctAnswers++; +} else { + alert('Interesting thought, ' + userName + '. If he\'s not playing, his phone\'s battery has likely died.'); +} + +console.log('User\'s response is "' + question3 + '" to question 3.'); + +//question four +let question4 = prompt('Is Lee\'s hair red?').toLowerCase(); + +if (question4 === 'no' || question4 === 'n') { + alert('Really, ' + userName + '? Have you looked at him? It\'s pretty red. :)'); +} else { + alert('That\'s correct, ' + userName + '! Been a ginger his whole life.'); + correctAnswers++; +} + +console.log('User\'s response is "' + question4 + '" to question 4.'); + +//question 5 +let question5 = prompt('Was he born in California?').toLowerCase(); + +if (question5 === 'yes' || question5 === 'y') { + alert('Yup! In a small town near Lancaster, California, ' + userName + '!'); + correctAnswers++; +} else { + alert('That is incorrect, ' + userName + '. He was born in northern California '); +} + +console.log('User\'s response is "' + question5 + '" to question 5.'); + +alert('Now for a more difficult question with a number for an answer. Do your best!'); + +//Question 6 + +let age = 31; + +for (let i = 0; i < 4; i++) { + let ageAnswer = prompt('How old is Lee? Redheads are deceptively difficult to tell with!'); + if (ageAnswer == age) { + alert('You got it right! Great job, partner. Lee is ' + age + '!'); + console.log('User response is ' + ageAnswer + ' to question 6'); + correctAnswers++; + break; + } + else if (ageAnswer > age) { + alert('You guessed a bit too high. Does he look that old?'); + console.log('User response is ' + ageAnswer + ' to question '); + } + else if (ageAnswer < age) { + alert('You\'re a bit too low. I realize Lee\'s immature, but not that bad.'); + console.log('User response is ' + ageAnswer + ' to question 6'); + } + else if (isNaN(ageAnswer) === true) { + alert('That is not a number. You can\'t do that.'); + console.log('User response is ' + ageAnswer + ' to question 6'); + } + else if ((i === 3) && (ageAnswer !== age)) { + alert('You\'ve run out of chances. Lee\'s ' + age + ', for the record!'); + console.log('User response is ' + ageAnswer + ' to question 6'); + } +} + +//Question 7 +let userCorrect = false; + +let pokemon = ['pikachu', 'zubat', 'drowzee', 'onyx', 'charmander', 'snorlax']; + +let guesses = 0; + +while (guesses < 7) { + let pokeAnswer = prompt('What Pokemon has Lee caught this week on PokemonGO?').toLowerCase(); + for (let i = 0; i < pokemon.length; i++) { + if (pokeAnswer === pokemon[i]) { + alert('You caught the right answer! Nice work! The ones he caught this week are: ' + pokemon); + console.log('User response is ' + pokeAnswer + ' to question 6'); + guesses = 7; + correctAnswers++; + userCorrect = true; + break; + } + } + if (guesses !== 7) { + alert('Not that one. You\'re not the very best, but try again!'); + console.log('User response is ' + pokeAnswer + ' to question 6'); + } + guesses++; +} +if (userCorrect === false) { + alert('Uh-Oh! You did not get any right. The Pokemon that Lee caught this week are: ' + pokemon); + console.log('User response is ' + pokeAnswer + ' to question 6'); +} + +alert(userName + ', you scored a total of ' + correctAnswers + ' out of 7'); +console.log(userName + 'scored a total of ' + correctAnswers + ' out of 7'); \ No newline at end of file diff --git a/img/headerbg.jpg b/img/headerbg.jpg new file mode 100644 index 0000000..513a587 Binary files /dev/null and b/img/headerbg.jpg differ diff --git a/img/leedance.jpg b/img/leedance.jpg new file mode 100644 index 0000000..8561a7a Binary files /dev/null and b/img/leedance.jpg differ diff --git a/img/leespock.jpg b/img/leespock.jpg new file mode 100644 index 0000000..6a94e9f Binary files /dev/null and b/img/leespock.jpg differ diff --git a/img/profile.jpg b/img/profile.jpg new file mode 100644 index 0000000..f22f96a Binary files /dev/null and b/img/profile.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..d5dd09f --- /dev/null +++ b/index.html @@ -0,0 +1,57 @@ + + + + About Me! + + + +
+ +

Who is Lee?

+ +

Hopefully you enjoyed the little Lee quiz. Now here are the facts. :D

+
+
+
+

Overview

+

I've lived in the Greater Seattle area most of my life, though I was born in California. When I was an infant, my parents traveled all over the place, including to Saudi Arabia and Egypt. I'm a semi-professional Lindy Hopper, and have been dancing for the past 9+ years. I perform with teams, compete fairly often, travel, and teach occasionally. I'm a huge geek. I love most sci-fi, have an affinity for video games, and keep the occasional anime fandom. The more coding I do, the more excited I get about doing it. I'm stoked to continue learning! +

+

Experience

+ + +

Hobbies

+ + +

Education

+ +
+ + + + + diff --git a/style.css b/style.css new file mode 100644 index 0000000..67e5ec2 --- /dev/null +++ b/style.css @@ -0,0 +1,68 @@ +body { + font-family: arial, sans-serif; + background-color: #ABF8FF; +} + +header > h1 { + font-size: 60px; + margin-bottom: -5px; + margin-top: -5px; + margin-left: 20px; +} + +.quiz { + width: 17%; + margin-left: 47px; + color: black; + font-weight: bold; + font-size: 20px; +} + +h1, h2, h3 { + color: navy; +} + +header { + width: 100%; + background-image: url("../img/headerbg.jpg"); + background-size: 100%; + border: navy solid 6px; +} + +.profile { + height: 200px; + width: 200px; + border-radius: 20%; + border: solid navy 5px; + margin-left: 50px; + margin-bottom: -10px; +} + +#content { + float: left; + width: 75%; +} + +#dance { + height: 150px; + width: 150px; +} + +#spock { + height: 150px; + width: 150px; +} + +#content { + margin: auto 70px; + position: relative; +} + +aside { + float: right; + width: 25%; + background-color: cyan; + border: 3px blue solid; + border-radius: 15px; + margin-top: -650px; +}