Category Archives: Excellent

Codecademy JavaScript Project: Training Days

// The scope of `random` is too loose 


const getRandEvent = () => {
  const random = Math.floor(Math.random() * 3);
  if (random === 0) {
    return 'Marathon';
  } else if (random === 1) {
    return 'Triathlon';
  } else if (random === 2) {
    return 'Pentathlon';
  }
};

// The scope of `days` is too tight 
const getTrainingDays = event => {
  let days;
  if (event === 'Marathon') {
    days = 50;
  } else if (event === 'Triathlon') {
    days = 100;
  } else if (event === 'Pentathlon') {
    days = 200;
  }

  return days;
};

// The scope of `name` is too tight 

const logEvent = (name, event) => {
  
  console.log(`${name}'s event is: ${event}`);
};

const logTime = (name, days) => {
  
  console.log(`${name}'s time to train is: ${days} days`);
};

const event = getRandEvent();
const days = getTrainingDays(event);
// Define a `name` variable. Use it as an argument after updating logEvent and logTime 
const name = 'Nala';

logEvent(name, event);
logTime(name, days);

const event2 = getRandEvent();
const days2 = getTrainingDays(event2);
const name2 = 'Warren';

logEvent(name2, event2);
logTime(name2, days2);

Codecademy JavaScript Project: Sleep Debt Calculator

const getSleepHours = day => {
  if (day === 'monday') {
    return 8;
  } else if (day === 'tuesday') {
    return 6;
  } else if (day === 'wednesday') {
    return 11;
  } else if (day === 'thursday') {
    return 6;
  } else if (day === 'friday') {
    return 9;
  } else if (day === 'saturday') {
    return 8;
  } else if (day === 'sunday') {
    return 7;
  }
};

/*console.log(getSleepHours('tuesday'));
console.log(getSleepHours('friday')); */

const getActualSleepHours = () => 8 + 6 + 11 + 6 + 9 + 8 + 7;

const getIdealSleepHours = idealHours => idealHours * 7;

/* console.log(getActualSleepHours());
console.log(getIdealSleepHours()); */

const calculateSleepDebt = () => {
  const actualSleepHours = getActualSleepHours();
  const idealSleepHours = getIdealSleepHours(7.5);

  if (actualSleepHours === idealSleepHours) {
    console.log('You got the perfect amount of sleep.');
  } else if (actualSleepHours > idealSleepHours) {
    console.log('You got ' + (actualSleepHours - idealSleepHours) + ' hour(s) of sleep than needed this week.');
  } else console.log('You got ' + (idealSleepHours - actualSleepHours) + ' hour(s) less sleep than you needed this week. Get some rest.');
};

calculateSleepDebt();

Codecademy JavaScript Project: Rock, Paper, Scissors

console.log('hi');

const getUserChoice = userInput => {
  userInput = userInput.toLowerCase();
  if (userInput === 'rock' || userInput === 'paper' || userInput === 'scissors' || userInput ==='bomb')
    return userInput;
  else return console.log("Not a valid choice!");
};

//console.log(getUserChoice("Rock"));
//console.log(getUserChoice("pizza"));

function getComputerChoice() {
  number = Math.floor(Math.random() * 3);
  if (number === 0)
    return 'rock';
  else if (number === 1)
    return 'paper';
  else return 'scissors';
};

//console.log(getComputerChoice());

function determineWinner(userChoice, computerChoice) {
  if (userChoice === computerChoice) {
    return "Tie!";
    }

  if (userChoice === 'bomb') {
    return "You win!";
  }

  if (userChoice === 'rock') {
    if (computerChoice === 'scissors') {
      return 'You win!'; 
      } else {
      return 'Computer wins!';
    }
  }

  if (userChoice === 'paper') {
     if (computerChoice === 'rock') {
      return 'You win!'; 
     } else  {
      return 'Computer wins!'; 
    }
  }

  if (userChoice === 'scissors') {
     if (computerChoice === 'paper') {
      return 'You win!';
     } else {
      return 'Computer wins!'; 
     }
  }
}

//console.log(determineWinner('rock', getComputerChoice()));

function playGame() {
  userChoice = getUserChoice('paper');
    console.log('You chose: ' + userChoice);
  computerChoice = getComputerChoice();
    console.log('Computer chose: ' + computerChoice);
  console.log(determineWinner(userChoice, computerChoice));
};

playGame()

Codecademy JavaScript Project: Race Day

let raceNumber = Math.floor(Math.random() * 1000);

//console.log(raceNumber);

let registeredEarly = true;
let runnerAge = 111;

if (runnerAge > 18 && registeredEarly === true)
  raceNumber += 1000;

if (runnerAge > 18 && registeredEarly === true) {
  console.log(`Runner Number ${raceNumber}, your start time is at 9:30am.`);
} else if (runnerAge > 18 && registeredEarly === false) {
    console.log(`Race Number ${raceNumber}, your start time is at 11:00am.`);
  } else if (runnerAge < 18) {
    console.log(`Runner Number ${raceNumber}, your start time is at 12:30pm.`);
  } else {
    console.log(`Runner Number ${raceNumber}, please come to the registration desk.`);
  }

Codecademy JavaScript Project: Magic 8 Ball

let userName = "Louise";

userName ? console.log(`Hello, ${userName}!`) : console.log('Hello!');

const userQuestion = "Will I succeed big in life?";

console.log(`${userName} asks: ${userQuestion}`);

let randomNumber = Math.floor(Math.random() * 8);

let eightBall = "";

if (randomNumber === 0)
  eightBall = 'Cannot predict now';

  else if (randomNumber === 1) 
    eightBall = 'It is certain';

  else if (randomNumber === 2) 
    eightBall = 'It is decidely so';

  else if (randomNumber === 3)
    eightBall = 'Reply hazy try again';

  else if (randomNumber === 4)
    eightBall = 'Do not count on it';

  else if (randomNumber === 5)
    eightBall = 'My sources say no';

  else if (randomNumber === 6)
    eightBall = 'Outlook not so good';

  else if (randomNumber === 7)
    eightBall = 'Signs point to yes';

console.log(`The magic 8-Ball says: ${eightBall}!`);




Codecademy JavaScript Project: Dog Years

// my age
const myAge = 42;

//dog's early years
let earlyYears = 2;

earlyYears *= 10.5;

//we already accounted for first two years
let laterYears = myAge - 2;

//calculating dog later years
laterYears *= 4;

console.log(earlyYears);
console.log(laterYears);

//adding early years with later years
myAgeInDogYears = earlyYears + laterYears;

// my name in lowercase
const myName = "Deepak".toLowerCase();

console.log(`My name is ${myName}. I am ${myAge} years old in humans years which is ${myAgeInDogYears} years old in dog years.`)

Codecademy JavaScript Project: Kelvin Weather

//constant variable cannot be changed
const kelvin = 0;

//celsius is 273 less than kelvin
let celsius = kelvin - 273;

//fahrenheit formula
let fahrenheit = celsius * (9/5) + 32;

//rounds down the decimal number
fahrenheit = Math.floor(fahrenheit);

console.log(`The temperature is ${fahrenheit} degrees Fahrenheit.`);

let newton = celsius * (33/100);
newton = Math.floor(newton);
console.log(`The temperature is ${newton} degrees Newton.`);

Codecademy CSS Project: Typography

@font-face {
  font-family: 'Abril Fatface';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/abrilfatface/v23/zOL64pLDlL1D99S8g8PtiKchq-dmjcDidBc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/merriweather/v30/u-4m0qyriQwlOrhSvowK_l5-eRZOf-LVrPHp.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/merriweather/v30/u-440qyriQwlOrhSvowK_l5-fCZMdeX3rg.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/worksans/v18/QGYsz_wNahGAdqQ43Rh_fKDptfpA4Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/worksans/v18/QGYsz_wNahGAdqQ43Rh_fKDptfpA4Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/worksans/v18/QGYsz_wNahGAdqQ43Rh_fKDptfpA4Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Croissant One';
  src: url('fonts/CroissantOne-Regular.ttf') format('ttf');
}

html {
  font-size: 18px;
}

@media only screen and (max-width: 1000px) {
  html {
    font-size: 16px;
  }
}

@media only screen and (max-width: 680px) {
  html {
    font-size: 14px;
  }
}

/* Header */

.header {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 4.44rem;
  padding: 0 12%;
  background-color: white;
  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.05);
  font-family: Verdana, sans-serif;
  font-size: .77rem;
  font-weight: bold;
}

.header .logo {
  flex-grow: 1;
  color: #ffb78c;
}

.header li {
  display: inline;
  padding-right: 2.22rem;
}

.header li a {
  text-decoration: none;
  color: #4a4a4a;
}

@media only screen and (max-width: 550px) {
  .header {
    flex-direction: column;
  }

  .header .logo {
    flex-grow: 0;
  }
}

/* Banner */

.banner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 50rem;
  background: url("https://content.codecademy.com/courses/freelance-1/unit-6/project-morocco/banner.jpg") center center no-repeat;
  background-size: cover;
  color: #ffb78c;
}

.banner h2 {
  padding: .55rem 0;
  border-top: 4px solid #ffb78c;
  border-bottom: 4px solid #ffb78c;
  font-size: 1.44rem;
  letter-spacing: 2px;
  font-weight: 500;
  font-family: "Work Sans", "Arial", sans-serif;
}

.banner h1 {
  padding-top: 1.11rem;
  font-size: 11rem;
  font-weight: 900;
  font-family: "Abril Fatface", sans-serif;
}

@media only screen and (max-width: 750px) {
  .banner {
    height: 40rem;
  }

  .banner h1 {
    font-size: 8rem;
  }
}

@media only screen and (max-width: 530px) {
  .banner {
    height: 30rem;
  }

  .banner h1 {
    font-size: 6rem;
  }
}

/* Journal */

.journal {
  padding: 0 25% 4rem 25%;
  background-color: rgb(254, 231, 218);
  color: #4a4a4a;
  font-family: "Work Sans", serif;

}

.photo {
  width: 75%;
  padding: 1.11rem;
  border-radius: 5px;
  margin: 0 auto 4.44rem auto;
  background-color: white;
}

.photo .image-container {
  overflow: hidden;
  margin-bottom: 1.11rem;
}

.photo .image-container img {
  width: 100%;
}

.photo .caption {
  font-style: italic;
  font-family: Merriweather, serif;
}

.photo.first {
  position: relative;
  top: -2.77rem;
  margin-bottom: 1.67rem;
}

.journal p {
  padding-bottom: 2.77rem;
  font-size: 1.5rem;
  line-height: 1.4;
}

.journal .first-letter {
  float: left;
  padding-right: 1.4rem;
  font-family: "Abril Fatface", serif;
  font-size: 7.44rem;
  color: #10b0d8;
  line-height: .87;
}

.quote {
  display: block;
  padding: 4.44rem 0;
  margin-bottom: 3.33rem;
  border-top: 4px solid black;
  border-bottom: 4px solid black;
  text-align: center;
  font-size: 3.55rem;
  font-weight: 800;
  line-height: 1.2;
}

@media only screen and (max-width: 680px) {
  .journal {
    padding: 0 10% 4rem 10%;
  }
}

/* Footer */

footer {
  display: flex;
  align-items: center;
  padding: 0 1%;
  background-color: #212121;
  font-family: "Croissant One", "Merriweather", serif;
}

footer .image-container {
  width: 400px;
}

footer .content {
  flex-grow: 1;
  font-style: italic;
  color: #9b9b9b;
  line-height: 1.5;
}

footer p {
  padding-bottom: 1.66rem;
}

footer p:last-child {
  padding-bottom: 0;
}

footer .author {
  color: #ffb78c;
}

footer em {
  color: #cfcfcf;
}

@media only screen and (max-width: 750px) {
  footer {
    flex-direction: column;
    padding: 0 10% 2rem 10%;
  }

  footer .image-container {
    height: 300px;
    margin-bottom: 2rem;
    overflow: hidden;
  }
}

Codecademy CSS Project: Paint Store

/* Universal Styles */

html {
  font-size: 16px;
}

body {
  font-family: "Open Sans", sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

strong {
  font-weight: bold;
}

.image-container {
  overflow: hidden;
}

.image-container img {
  display: block;
  max-width: 100%;
}

@media only screen and (max-width: 990px) {
  html {
    font-size: 14px;
  }
}

/* Header */

header {
  display: flex;
  align-items: center;
  padding: .5rem 3.75rem;
  background-color: #ff8000;
}

header .logo-small {
  display: none;
}

header .logo-small,
header .logo-big {
  flex-grow: 1;
}

nav li {
  display: inline;
  padding-right: 2rem;
}

nav li:last-child {
  padding-right: 0;
}

@media only screen and (max-width: 990px) {
  header .logo-big {
    display: none;
  }

  header .logo-small {
    display: block;
  }
}

@media only screen and (max-width: 540px) {
  header {
    flex-direction: column;
    padding-left: 0;
    padding-right: 0;
  }

  header .logo-small {
    margin-bottom: 1rem;
  }
}

/* Banner */

#banner {
  position: relative;
  height: 43.75rem;
  padding: 0 25%;
  background: url("	https://content.codecademy.com/courses/freelance-1/unit-6/banner.png") center center no-repeat;
  background-size: cover;
  text-align: center;
}

#banner:before { /* Orange Overlay */
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 128, 0, 0.75);

}

#banner * {
  position: relative; /* Makes elements display above overlay. */
}

h1 {
  padding-top: 10.4375rem;
  padding-bottom: 1.25rem;
  font-family: "Creepster", cursive;
  font-size: 8rem;
  color: rgba(0, 0, 0, 0.7);

}

#banner p {
  color: white;
  line-height: 1.5;
  font-size: 1.375rem;
}

@media only screen and (max-width: 820px) {
  h1 {
    padding-top: 7rem;
    font-size: 6rem;
  }
}

@media only screen and (max-width: 590px) {
  h1 {
    font-size: 4rem;
  }
}

/* Color Guide */

#color-guide {
  padding: 3.875rem 15% 13.5rem 15%;
}

#color-guide .introduction {
  padding: 0 10%;
  margin-bottom: .75rem;
  text-align: center;
  font-size: 1.375rem;
  line-height: 1.4;
}

#color-guide h2 {
  margin-bottom: 2.4375rem;
  line-height: 1;
  font-size: 2rem;
  color: #ff8800;
}

#color-guide .color {
  display: flex;
  justify-content: space-between;
  padding-top: 5.25rem;
}

.color .information {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 35%;
}

.color .information h3 {
  padding-bottom: .5rem;
  font-size: 1.375rem;
  font-weight: bold;
}

.color .information p {
  font-size: .875rem;
  line-height: 1.4;
}

.color .swatches {
  width: 60%;
}

.color .swatches h4 {
  margin-bottom: 1.25rem;
  font-size: 1.125rem;
  font-weight: bold;
  color: #9b9b9b;

}

.color .swatch {
  display: flex;
  height: 6.6875rem;
  border: 10px solid #e6e6e6;
  margin-bottom: 1.25rem;
}

.color .swatch:last-child {
  margin-bottom: 0;
}

.color .swatch > div {
  flex-grow: 1;
  border-right: 10px solid #e6e6e6;
}

.color .swatch > div:last-child {
  border-right: 0;
}

@media only screen and (max-width: 820px) {
  #color-guide .color {
    flex-direction: column;
    align-items: center;
  }

  .color .information {
    width: 100%;
    margin-bottom: 3rem;
    align-items: center;
  }

  .color .information h3 {
    padding-bottom: 1.5rem;
  }

  .color .information p {
    margin-bottom: 2rem;
  }

  .color .swatches {
    width: 100%;
  }
}

/* Red Swatches */

.reds .base-color {
  color: hsl(350, 100%, 50%);
}

/* Red lightness decreases by 15 */
.reds .lightness .color-1 {
  background-color: hsl(350, 100%, 80%)

}

.reds .lightness .color-2 {
  background-color: hsl(350, 100%, 65%);
}

.reds .lightness .color-3 {
  background-color: hsl(350, 100%, 50%);
}

.reds .lightness .color-4 {
  background-color: hsl(350, 100%, 35%);
}

.reds .lightness .color-5 {
  background-color: hsl(350, 100%, 20%);
}

/* Red saturation decreases by 15 */
.reds .saturation .color-1 {
  background-color: hsl(350, 100%, 50%);

}

.reds .saturation .color-2 {
  background-color: hsl(350, 85%, 50%);
}

.reds .saturation .color-3 {
  background-color: hsl(350, 70%, 50%);
}

.reds .saturation .color-4 {
  background-color: hsl(350, 55%, 50%);
}

.reds .saturation .color-5 {
  background-color: hsl(350, 40%, 50%);
}

/* Red hue increases by 15 */
.reds .hue .color-1 {
  background-color: hsl(320, 100%, 50%);

}

.reds .hue .color-2 {
  background-color: hsl(335, 100%, 50%);
}

.reds .hue .color-3 {
  background-color: hsl(350, 100%, 50%);
}

.reds .hue .color-4 {
  background-color: hsl(5, 100%, 50%);
}

.reds .hue .color-5 {
  background-color: hsl(20, 100%, 50%);
}

/* Green Swatches */

.greens .base-color {
  color: hsl(130, 100%, 50%);
}

/* Green lightness decreases by 20 */
.greens .lightness .color-1 {
  background-color: hsl(103, 100%, 90%);
}

.greens .lightness .color-2 {
  background-color: hsl(103, 100%, 70%);
}

.greens .lightness .color-3 {
  background-color: hsl(103, 100%, 50%);
}

.greens .lightness .color-4 {
  background-color: hsl(103, 100%, 30%);
}

.greens .lightness .color-5 {
  background-color: hsl(104, 100%, 10%);
}

/* Green saturation decreases by 20 */
.greens .saturation .color-1 {
  background-color: hsl(130, 100%, 50%);
}

.greens .saturation .color-2 {
  background-color: hsl(130, 80%, 50%);
}

.greens .saturation .color-3 {
  background-color: hsl(130, 60%, 50%);
}

.greens .saturation .color-4 {
  background-color: hsl(130, 40%, 50%);
}

.greens .saturation .color-5 {
  background-color: hsl(131, 20%, 50%);
}

/* Green hue increases by 22 */
.greens .hue .color-1 {
  background-color: hsl(86, 100%, 50%);
}

.greens .hue .color-2 {
  background-color: hsl(108, 100%, 50%);
}

.greens .hue .color-3 {
  background-color: hsl(130, 100%, 50%);
}

.greens .hue .color-4 {
  background-color: hsl(152, 100%, 50%);
}

.greens .hue .color-5 {
  background-color: hsl(174, 100%, 50%);
}

/* Blue Swatches */

.blues .base-color {
  color: hsl(220, 100%, 50%);
}

/* Blue lightness decreases by 20 */
.blues .lightness .color-1 {
  background-color: hsl(220, 100%, 90%);
}

.blues .lightness .color-2 {
  background-color: hsl(220, 100%, 70%);
}

.blues .lightness .color-3 {
  background-color: hsl(220, 100%, 50%);
}

.blues .lightness .color-4 {
  background-color: hsl(220, 100%, 30%);
}

.blues .lightness .color-5 {
  background-color: hsl(220, 100%, 10%);
}

/* Blue saturation decreases by 20 */
.blues .saturation .color-1 {
  background-color: hsl(220, 100%, 50%);
}

.blues .saturation .color-2 {
  background-color: hsl(220, 80%, 50%);
}

.blues .saturation .color-3 {
  background-color: hsl(220, 60%, 50%);
}

.blues .saturation .color-4 {
  background-color: hsl(220, 40%, 50%);
}

.blues .saturation .color-5 {
  background-color: hsl(220, 20%, 50%);
}

/* Blue hue decreases by 20 */
.blues .hue .color-1 {
  background-color: hsl(260, 100%, 50%);
}

.blues .hue .color-2 {
  background-color: hsl(240, 100%, 50%);
}

.blues .hue .color-3 {
  background-color: hsl(220, 100%, 50%);
}

.blues .hue .color-4 {
  background-color: hsl(200, 100%, 50%);
}

.blues .hue .color-5 {
  background-color: hsl(180, 100%, 50%);
}

/* Footer */

footer {
  position: relative;
  height: 30rem;
  padding: 7.8125rem 30% 0 30%;
  background: url("https://content.codecademy.com/courses/freelance-1/unit-6/footer.png") center center no-repeat;
  background-size: cover;
  text-align: center;
  font-size: 1.125rem;
  line-height: 1.4;
  color: white;
}

footer:before { /* Overlay */
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);

}

footer * {
  position: relative; /* Makes elements display above overlay. */
}

footer strong {
  display: block;
  margin-bottom: 1.25rem;
  font-size: 2.25rem;
}

footer p {
  margin-bottom: 4.3125rem;
}

footer .button {
  padding: 1.25rem 3.75rem;
  border-radius: 4px;
  background-color: #ff8000;
}

@media only screen and (max-width: 560px) {
  footer {
    padding: 4.8125rem 15% 0 15%;
  }
}

Codecademy Project: Broadway

html, body {
  margin: 0;
  padding: 0;
}

header {
  background-color: #333333;
  position: fixed;
  width: 100%;
  z-index: 1;
}

nav {
  margin: 0;
  padding: 20px 0;
}

nav li {
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 12px;
  display: inline-block;
  width: 80px;
}

main {
  text-align: center;
  position: relative;
  top: 80px;
}

main h1 {
  color: #333;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 70px;
  margin-top: 0px;
  padding-top: 80px;
  margin-bottom: 80px;
  text-transform: uppercase;
}

footer {
  background-color: #333;
  color: #fff;
  padding: 30px 0;
  position: fixed;
}

footer p {
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  font-size: 11px;
}

.container {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 10px;
  text-align: center;
}

.jumbotron {
  height: 800px;
  background-image: url("https://content.codecademy.com/projects/broadway/bg.jpg");
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

.btn-main {
  background-color: #333;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 1.3px;
  padding: 16px 40px;
  text-decoration: none;
  text-transform: uppercase;
}

.btn-default {
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 1.3px;
  padding: 10px 20px;
  text-decoration: none;
  text-transform: uppercase;  
  margin-bottom: 20px;      
}

.supporting {
  padding-top: 80px;
  padding-bottom: 100px;
}

.supporting .col {
  font-family: 'Raleway', sans-serif;
  text-align: center;
  display: inline-block;
  width: 200px;
  height: 200px;
}

.supporting img {
  height: 32px;
}

.supporting h2 {
  font-weight: 600;
  font-size: 23px;
  text-transform: uppercase;
}

.supporting p {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  padding: 0 20px;
  margin-bottom: 20px;
}

.supporting a {
  background-color: white;
  color: #333333;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.3px;
  text-decoration: none;
  text-transform: uppercase;
  padding: 10px;
  margin-bottom: 10px;
  border: 2px solid #333333; 
}

@media (max-width: 500px) {
  main h1 {
    font-size: 50px;
    padding: 0 40px;
  }

  .supporting .col {
    width: 100%;
  }
}

Codecademy Project: Olivia Woodruff Portfolio

STYLE.CSS

.header {
  background-color: CornflowerBlue;
  text-align: center;
}

.about-me {
  font-size: 20px;
  opacity: 50%;
}

.title {
  font-weight: bold;
}

h1 {
  color: Azure;
}

body {
  font-family: Georgia;
  background-image: url("https://content.codecademy.com/courses/learn-css-selectors-visual-rules/hypnotize_bg.png");

}

INDEX.HTML

<!DOCTYPE html>
<html>

<head>
  <title></title>
  <link href="style.css" type="text/css" rel="stylesheet">
</head>

<body>
  <div class="header">
    <img src="https://content.codecademy.com/courses/freelance-1/unit-2/travel.jpeg" />
    <h1>Olivia Woodruff</h1>
    <p class="about-me">I am a developer specializing in HTML and CSS. I like to run, bike, and make coffee using an Aeropress.</p>
  </div>

  <h2>Projects</h2>
  <p class="title">Web Development projects</p>
  <ul>
    <li>Coffee BruΓ«r</li>
    <li>Taco Finder</li>
    <li>CSS Selector Finder</li>
    <li>HTML Formatter</li>
  </ul>

  <p class="title">Design projects</p>
  <ul>
    <li>Yum Yum Fudge Inc.</li>
    <li>University of Marimont Dance Marathon</li>
  </ul>
  <h2>Contact</h2>
  <p>Find me on Twitter, Dribbble, and GitHub.</p>

  <h6>&copy; Copyright. All Rights Reserved.</h6>
</body>

</html>

Codecademy Project: Healthy Recipes

STYLE.CSS

img {
  height: 150px;
}

.description {
  font-size: 20px;
}

#cook-time {
  font-weight: bold;
}

.ingredients li {
  list-style: square;
}

p.time {
  color: gray;
}

.external_link {
  color: SeaGreen;
}

font-family h1 h2 p li{
  font-family: Helvetica;
}

INDEX.HTML

<!DOCTYPE html>
<html>

<head>
  <title>Quinoa and Kale Salad Recipe</title>
  <link href="style.css" type="text/css" rel="stylesheet">
</head>

<body>

  <img src="https://content.codecademy.com/courses/freelance-1/unit-2/salad.jpg" alt="Kale Caeasar Salad"/>
  <h1>Kale Caesar Quinoa Salad with Roasted Chicken</h1>
  <p class="description">Kale and quinoa provide a healthy base for roasted chicken topped with a light Caesar sauce.</p>

  <p id="cook-time">Total time: 45 minutes</p>

  <h2>Ingredients</h2>
  <ul class="ingredients">
    <li>1/4 cup kale</li>
    <li>1 cup Quinoa</li>
    <li>2 tbsp Olive Oil</li>
    <li>1 chicken breast</li>
    <li>Caesar Dressing</li>
  </ul>

  <h2>Preparation</h2>
  <ol>
    <li>
      <p>Prepare quinoa and roast chicken until golden brown and 165 in middle.</p>
      <p class="time">Time: 40 minutes</p>
    </li>
    <li>
      <p>Toss quinoa, chicken, kale, and Caesar dressing until coated.</p>
      <p class="time">Time: 4 minutes</p>
    </li>
    <li>
      <p>Add walnuts and olive oil as garnish.</p>
      <p class="time">Time: 1 minute</p>
    </li>
  </ol>

  <p class="citation">Find this recipe and more <a href="http://www.myrecipes.com/recipe/kale-caesar-salad-chicken" target="_blank" class="external-link">here</a>.</p>

</body>

</html>

Codecademy CSS Project: The Box Model – Davie’s Burgers

STYLE.CSS

/* Universal Styles */

body {
  background-image: url("https://content.codecademy.com/courses/web-101/unit-6/htmlcss1-img_foodlogo.png");
  text-align: center;
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
}

a {
  text-decoration: none;
}

/* Navigation */

nav {
  text-align: center;
}

nav img {
  display: block;
  width: 180px;
  margin: 0 auto;
}

nav span {
  display: block;
  font-size: 16px;
  font-weight: 100;
  letter-spacing: 2px;
  margin: 10px 0;
}

nav a {
  color: #666666;
}

/* Content Container */

.content {
  width: 100%;
  height: 500px;
  margin: 10px auto;
  overflow: scroll;
}

/* Content Header */

.header {
  background-image: url("https://content.codecademy.com/courses/web-101/unit-6/htmlcss1-img_burgerphoto.jpeg");
  background-position: center;
  background-size: cover;
  height: 320px;
}

.header h1 {
  background-color: #05A8AA;
  color: #FFF;
  font-family: 'Oswald', sans-serif;
  font-size: 40px;
  font-weight: 300;
  line-height: 40px;
  width: 68%;
  padding: 20px;
  margin: 0 auto;
}

/* Content Body */

.content .body {
  width: 90%;
  margin: 0 auto;
}

.body p {
  color: #333333;
  font-weight: 100;
  line-height: 34px;
  width: 90%;
  margin-top: 18px;
}

/* Content Button */

.button {
  border-radius: 4px;
  color: #05A8AA;
  display: block;
  font-weight: 700;
  width: 200px;
  padding: 20px;
  margin: 40px auto;
  border: 1px solid blue;
}

.button:hover {
  background-color: #05A8AA;
  border: 1px solid #05A8AA;
  color: #FFF;
}

/* Content Nutrition */

ul.nutrition {
  padding: 20px;
}

ul.nutrition li {
  display: inline-block;
  background-color: #05A8AA;
  list-style: none;
  width: 200px;
  padding: 10px 20px;
  margin-bottom: 3px;
}

.nutrition .category {
  color: white;
  font-weight: 100;
  letter-spacing: 2px;
  display: block;
}

.nutrition .value {
  color: white;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
}

INDEX.HTML

<!DOCTYPE html>
<html>
<head>
  <title>Davie JR's Menu</title>
  <link href="https://fonts.googleapis.com/css?family=Roboto:100,500,700|Oswald:300,400,700" rel="stylesheet">
  <link rel="stylesheet" type="text/css" href="reset.css">
  <link rel="stylesheet" type="text/css" href="style.css">
</head>

<body>

  <!-- Navigation Section -->

  <nav>
    <img src="https://content.codecademy.com/courses/web-101/unit-6/htmlcss1-img_burger-logo.svg" />
    <span><a href="#">MENU</a></span>
    <span><a href="#">NUTRITION</a></span>
    <span><a href="#">ORDER</a></span>
    <span><a href="#">LOCATIONS</a></span>
  </nav>

  <!-- Content Section -->

  <div class="content">

    <!-- Content Header -->
    
    <div class="header">
      <h1>BBQ BACON BURGER</h1>
    </div>

    <!-- Content Body -->

    <div class="body">
      <p>
        Our BBQ Bacon Burger features our special house ground blend of wagyu and sirloin, spiced perfectly, and finished off with just a drop of white truffle oil. A butter grilled brioche bun layered with roasted red onion, perfectly crispy pork belly, and our hickory smoked BBQ sauce.
      </p>

      <!-- Order Button -->

      <a href="#" class="button">ORDER NOW</a>

      <!-- Nutrition Information -->
      
      <ul class="nutrition">
        <li>
          <span class="category">CALORIES</span>
          <span class="value">678</span>
        </li>
        <li>
          <span class="category">FAT</span>
          <span class="value">32</span>
        </li>
        <li>
          <span class="category">PROTEIN</span>
          <span class="value">8</span>
        </li>
        <li>
          <span class="category">CARBOHYDRATES</span>
          <span class="value">34</span>
        </li>
        <li>
          <span class="category">SODIUM</span>
          <span class="value">112</span>
        </li>
      </ul>
    </div>
  </div>
  
</body>
</html>

Learn about Agile project management and SCRUM – Google Digital Garage

We live in an era where businesses operate in an environment of incredible technological innovation and where customers have more choice than ever before. How do we build a product that customers love while also helping a business achieve its objectives? This requires being able to cope with a fast-changing environment, to respond to changing customer needs, to experiment, and learn quickly. It is in this context that Agile Methodologies have become a popular choice for project management frameworks in product development.
β€” Read on learndigital.withgoogle.com/digitalgarage/

Codecademy Intermediate Python3 Project: Event Coordinator

guests = {}

def read_guestlist(file_name):
  text_file = open(file_name,'r')
  n = None
  while True:
    if n is not None:
      line_data = n.strip().split(",")
    else:
      line_data = text_file.readline().strip().split(",")

    if len(line_data) < 2:
    # If no more lines, close file
      text_file.close()
      break

    name = line_data[0]
    age = int(line_data[1])
    guests[name] = age

    n = yield name, age


guests_gen = read_guestlist('guest_list.txt')
for i in range(10):
  print(next(guests_gen))

guests_gen.send('Jane,35')

print(next(guests_gen))
print(next(guests_gen))
print(next(guests_gen))
print(next(guests_gen))
#print(next(guests_gen))

drinks_gen = (name for name, age in guests.items() if age >= 21)
print(list(drinks_gen))

def table_one_gen():
  food_name = "Beef"
  table_num = 1
  for i in range(1, 6):
    seat_num = i
    yield("Food: " + food_name, "Table: " + str(table_num), "Seat: " + str(seat_num))

def table_two_gen():
  food_name = "Chicken"
  table_num = 2
  for i in range(1, 6):
    seat_num = i
    yield("Food: " + food_name, "Table: " + str(table_num), "Seat: " + str(seat_num))

def table_three_gen():
  food_name = "Fish"
  table_num = 3
  for i in range(1, 6):
    seat_num = i
    yield("Food: " + food_name, "Table: " + str(table_num), "Seat: " + str(seat_num))

def connected_tables():
  yield from table_one_gen()
  yield from table_two_gen()
  yield from table_three_gen()

all_tables = connected_tables()

def seating_arrangement(guests, all_tables):
  for name in guests:
    yield ("Name: " + name, next(all_tables))


seat_arrange = seating_arrangement(guests, all_tables)

for i in seat_arrange:
  print(i)

Codecademy Intermediate Python3 Project: New Teacher in Town

SCRIPT.PY

from roster import student_roster
from classroom_organizer import ClassroomOrganizer
import itertools

student_iter = iter(student_roster)

for i in range(10):
 print(next(student_iter))

new_organizer = ClassroomOrganizer()
combos = new_organizer.student_combinations()
print(list(combos))

math_students = new_organizer.get_students_with_subject("Math")

science_students = new_organizer.get_students_with_subject("Science")

print(science_students)

math_and_science = itertools.combinations(math_students + science_students, 4)

print(list(math_and_science))

CLASSROOM_ORGANIZER.PY

from roster import student_roster
import itertools

# Import modules above this line
class ClassroomOrganizer:
  def __init__(self):
    self.sorted_names = self._sort_alphabetically(student_roster)

  def _sort_alphabetically(self,students):
    names = []
    for student_info in students:
      name = student_info['name']
      names.append(name)
    return sorted(names)

  def __iter__(self):
    self.index = 0
    return self

  def __next__(self):
    if self.index >= len(self.sorted_names):
      raise StopIteration
    
    student_name = self.sorted_names[self.index]
    self.index += 1
    return student_name


  def get_students_with_subject(self, subject):
    selected_students = []
    for student in student_roster:
      if student['favorite_subject'] == subject:
        selected_students.append((student['name'], subject))
    return selected_students

  def student_combinations(self):
    seating_chart = itertools.combinations(self.sorted_names, 2)
    return seating_chart


########
#organizer = ClassroomOrganizer()

#for name in organizer:
  #print(name)

Prompt:

Describe your most memorable vacation.

My most memorable vacation was when my friend and I traveled to Arizona. We had fun visiting different parts of Phoenix, Chandler, Scottsdale, Sedona, and Tucson. I am a big fan of Arizona because the state is full of mountains, deserts, lakes, and forests. There is something for everyone as I learned that it even snows in the northern part of the state!

Spiritual Technique

I started practicing a technique where whenever I feel an energetic imbalance with someone as if they have done more for me than I am doing for them, I send them lots of positive energy in my mind. I pray for them and bless them. I see them covered in a substance like paint or honey full of pure good energy. I know that others can feel what we think of them. If I think ill of someone, they can sense it. If I think good of someone, they can also feel it. I send as much positive energy in my mind until I sense we have restored the balance in energy exchange.

Memorizing & Splitting up The DDP Yoga Routine:

One of the best decisions I have made is to memorize the energy routine from ddp yoga.

There is the standing-up part. Stretching the arms.

There is the bending over part. Bent-legged bar back, straight back.

There is the leg lifting part while bent over. Both sides.

The cat-cow part with the broken table stretch.

The part on your back. Bridge.

Cross-legged sitting up part. Stretch forward.

Having memorized and customized the energy routine, I can watch The Last Dance while doing yoga.

Prompt:

Are there things you try to practice daily to live a more sustainable lifestyle?

I was just now thinking about this topic! I find that if I do a few simple practices a day, my life becomes better ,and if I avoid doing them, my life gets worse. Exercise. Meditation. Blogging. Those are the top three.

Python Project: Weather Forecast API

The code below connects with National Weather Service api and returns the current forecast for your zone.

import requests

#ask for zone, have ILZ as default
#Show info for the zone
#ask for new zone
#repeat until y/n is not

while True:
  try:
    zone = input("Enter a zone: " )

    #zone and weather api link
    if zone == '':
      zone = 'ILZ103'
    url = 'https://api.weather.gov/zones/forecast/' + zone + '/forecast'


    response = requests.get(url)
    forecast = response.json()['properties']

    #print(forecast.keys())

    print("Zone: " + forecast['zone'])
    print(' ')

    for period in forecast['periods']:
      print(period.get('name'))
      print(period.get('detailedForecast'))
      print(' ')

    again = input("Try again? y/n: ").strip().lower()
    if again != 'y':
      break

  except KeyError: 
    print("Enter a correct zone number.")

zone list: https://alerts.weather.gov/cap/il.php?x=2
inspired by: https://justinbraun.com/python-101-pulling-the-weather-forecast-with-the-nws-api/

Python Project: Movie Recommendation

Movie dataset from Group Lens. Thanks ChatGPT for the mentorship!

import pandas as pd
from sklearn.metrics.pairwise import cosine_similarity

df_movies = pd.read_csv('movies.csv')
df_ratings = pd.read_csv('ratings.csv')

df_movies.head()

df_ratings.head()

df_combined = pd.merge(df_movies, df_ratings, on='movieId')

df_combined.head()

df_combined.value_counts('title')

df_pivot = df_combined.pivot_table(index = 'userId', columns = 'title', values = 'rating')

df_pivot.head()

similarity_matrix = cosine_similarity(df_pivot.fillna(0))

similarity_matrix

def find_movie(movie_title):
    movie_index = df_pivot.columns.get_loc(movie_title)
    similarity_score = similarity_matrix[movie_index]
    similar_movie_indices = similarity_score.argsort()[::-1]
    similar_movie_indices = similar_movie_indices[similar_movie_indices != movie_index]
    similar_movies = df_pivot.columns[similar_movie_indices][:5]
    return similar_movies

similar_titles = find_movie("Alfie (2004)")

', '.join(similar_titles)



Python Project: Abraham Hicks Process Selector

Press play to try.

process_dict = {
1: ['rampage of appreciation', 'magical creation box', 'creative workshop', 'virtual reality', 'prosperity game', 'meditation', 'evaluating dreams', 'book of positive aspects'], 2: ['rampage of appreciation', 'magical creation box', 'creative workshop', 'virtual reality', 'prosperity game', 'meditation', 'evaluating dreams', 'book of positive aspects', 'scripting', 'placemat process'], 3: ['rampage of appreciation', 'magical creation box', 'creative workshop', 'virtual reality', 'prosperity game', 'meditation', 'evaluating dreams', 'book of positive aspects', 'scripting', 'placemat process'], 4: ['rampage of appreciation', 'magical creation box', 'creative workshop', 'virtual reality', 'prosperity game', 'meditation', 'evaluating dreams', 'book of positive aspects', 'scripting', 'placemat process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if...", 'segment intending'], 5: ['rampage of appreciation', 'magical creation box', 'creative workshop', 'virtual reality', 'prosperity game', 'meditation', 'evaluating dreams', 'book of positive aspects', 'scripting', 'placemat process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if...", 'segment intending'], 6: ['virtual reality', 'prosperity game', 'meditation', 'evaluating dreams', 'book of positive aspects', 'scripting', 'placemat process', 'wallet process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if...", 'segment intending'], 7: ['virtual reality', 'prosperity game', 'meditation', 'evaluating dreams', 'book of positive aspects', 'placemat process', 'wallet process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if...", 'segment intending'], 8: ['virtual reality', 'prosperity game', 'meditation', 'evaluating dreams', 'book of positive aspects', 'placemat process', 'focus wheel process', 'pivoting', 'wallet process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if...", 'segment intending'], 9: ['prosperity game', 'meditation', 'evaluating dreams', 'book of positive aspects', 'placemat process', 'find the feeling place', 'focus wheel process', 'pivoting', 'wallet process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if...", 'segment intending'], 10: ['prosperity game', 'meditation', 'evaluating dreams', 'book of positive aspects', 'placemat process', "reclaiming one's natural state of health", 'turning it over to the manager', 'releasing resistance to become free of debt', 'find the feeling place', 'focus wheel process', 'pivoting', 'wallet process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if...", 'segment intending'], 11: ['prosperity game', 'meditation', 'evaluating dreams', 'placemat process', "reclaiming one's natural state of health", 'turning it over to the manager', 'releasing resistance to become free of debt', 'find the feeling place', 'focus wheel process', 'pivoting', 'wallet process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if...", 'segment intending'], 12: ['prosperity game', 'meditation', 'evaluating dreams', "reclaiming one's natural state of health", 'turning it over to the manager', 'releasing resistance to become free of debt', 'find the feeling place', 'focus wheel process', 'pivoting', 'wallet process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if..."], 13: ['prosperity game', 'meditation', 'evaluating dreams', "reclaiming one's natural state of health", 'turning it over to the manager', 'releasing resistance to become free of debt', 'find the feeling place', 'focus wheel process', 'pivoting', 'wallet process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if..."], 14: ['prosperity game', 'meditation', 'evaluating dreams', "reclaiming one's natural state of health", 'turning it over to the manager', 'releasing resistance to become free of debt', 'find the feeling place', 'focus wheel process', 'pivoting', 'wallet process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if..."], 15: ['prosperity game', 'meditation', 'evaluating dreams', "reclaiming one's natural state of health", 'turning it over to the manager', 'releasing resistance to become free of debt', 'find the feeling place', 'focus wheel process', 'pivoting', 'wallet process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if..."], 16: ['prosperity game', 'meditation', 'evaluating dreams', "reclaiming one's natural state of health", 'turning it over to the manager', 'releasing resistance to become free of debt', 'find the feeling place', 'focus wheel process', 'pivoting', 'wallet process', 'clearing clutter for clarity', 'which thought feels better', "wouldn't be nice if..."], 17: ['meditation', 'evaluating dreams', 'moving up the emotional scale', "reclaiming one's natural state of health", 'turning it over to the manager', 'releasing resistance to become free of debt', 'find the feeling place', 'focus wheel process', 'pivoting', 'clearing clutter for clarity', 'which thought feels better'], 18: ['meditation', 'evaluating dreams', 'moving up the emotional scale', "reclaiming one's natural state of health", 'releasing resistance to become free of debt'], 19: ['meditation', 'evaluating dreams', 'moving up the emotional scale', "reclaiming one's natural state of health", 'releasing resistance to become free of debt'], 20: ['meditation', 'evaluating dreams', 'moving up the emotional scale', "reclaiming one's natural state of health", 'releasing resistance to become free of debt'], 21: ['meditation', 'evaluating dreams', 'moving up the emotional scale', "reclaiming one's natural state of health", 'releasing resistance to become free of debt'], 22: ['meditation', 'evaluating dreams', 'moving up the emotional scale', "reclaiming one's natural state of health", 'releasing resistance to become free of debt']}

mood_dict = {
1: 'Joy/Appreciation/Empowerment/Freedom/Love/Knowledge', 
2: 'Passion',
3: 'Enthusiasm/Eagerness/Happiness', 
4: 'Positive Expectation/Belief', 
5: 'Optimism', 
6: 'Hopefulness', 
7: 'Contentment',
8: 'Boredom', 
9: 'Pessimism',
10: 'Frustration/Irritation/Impatience', 
11: 'Overwhelment',
12: 'Disappointment',
13: 'Doubt',
14: 'Worry', 
15: 'Blame',
16: 'Discouragement',
17: 'Anger',
18: 'Revenge',
19: 'Hatred/Rage',
20: 'Jealousy',
21: 'Insecurity/Guilt/Unworthiness',
22: 'Fear/Grief/Desperation/Despair/Powerlessness'
}

for key, value in mood_dict.items():
  print(key, value)

while True:  
  try:    
    mood_number = int(input("Pick your mood number: "))

    process_list = process_dict.get(mood_number)
    print("\nProcesses: " + ', '.join(process_list))
    try_again = input("try again? y/n: ").lower()
    if try_again != 'y':
      break

  except (ValueError, TypeError):
    print("Please enter a valid number.")

Python Project: Mood O Meter

Press play to try.

#function to check mood and energy
def mood_check():
  tuple = ('high', 'low')
  while True:
    mood = input("Rate your mood (low or high): ").strip().lower()
    energy = input("Rate your energy (low or high): ").strip().lower()
    if mood in tuple and energy in tuple:
      return mood, energy
    else:
      print('Please enter valid answers.')

#function to get recommendation
def recommendation(mood, energy):
  if mood == 'high' and energy == 'high':
    return("You are feeling great! Do all the important things in your life that require a good mood and good energy!")
  elif mood == 'high' and energy == 'low':
    return("Your mood is high and energy is low. Consider resting and relaxing. Journaling. Drink coffee if you want more energy. Count your blessings. Speak positive affirmations.")
  elif mood == 'low' and energy == 'high':
    return("Your mood is low and energy is high. Consider working out so that you can use your energy to raise your mood. Clutter Clearing. Cleaning.")
  elif mood == 'low' and energy == 'low':
    return("Your mood and energy are both low. Consider taking a nap, meditating, or going to sleep to rest and refresh. Watch funny clips and shows.")
     
#main code
mood, energy = mood_check()
print(recommendation(mood, energy))

Feeling Is The Secret, Neville Goddard

Never entertain an undesirable feeling, nor think sympathetically about wrong in any shape or form. Do not dwell on the imperfection of yourself or others. To do so is to impress the subconscious with these limitations. What you do not want done unto you, do not feel that it is done unto you or another. This is the whole law of a full and happy life. Everything else is commentary.
β€” Read on www.feelingisthesecret.org/

The exercise effect

After four months of treatment, Blumenthal found, patients in the exercise and antidepressant groups had higher rates of remission than did the patients on the placebo. Exercise, he concluded, was generally comparable to antidepressants for patients with major depressive disorder.
β€” Read on www.apa.org/monitor/2011/12/exercise

Python Project: Dice Roller

Press play to try.

import random

while True:
  roll = input("Do you want to roll two dice? (y/n)")

  if roll.lower() == "y":
    dice_one = random.randint(1,6)
    print("Dice one: {}".format(dice_one))

    dice_two = random.randint(1,6)
    print("Dice two: {}".format(dice_two))

  else: 
    print("Thanks for playing.")
    break

Python Project: Mad Libs

Press play to try.

#madlibs

while True:

  adjective = input("Enter an adjective: ")
  noun = input("Enter a noun: ")
  adverb = input("Enter an adverb: ")
  verb = input("Enter a verb: ")

  sentence = """He put the good {adjective} cup of {noun} {adverb} on the table by my bed, and I took a refreshing {verb}.""".format(adjective=adjective, noun=noun, adverb=adverb, verb=verb)

  print(sentence)
  
  again = input("Play again? y/n: ")
  if again.lower() != "y":
    break

#quote from The Inimitable Jeeves by PG Wodehouse.