13 For Loop

How can we leverage the variables to cut down on repeated code?

Vocabulary

Loop, Iteration, Condition, Conditional Statement, Increment, Counter, Index, Exit Condition

Study Questions

  1. How do loops help make code more efficient?
  2. Is the For Loop’s condition checked at the beginning or the end?
  3. Is the For Loop’s counter updated at the beginning or the end of each loop?

Activity

  • Watch Video #1 (below)
  • Create a e-Greeting Card. Theme of the card is Happy New Year/ New Beginnings. Talk to the teacher if you are interested in a different theme for your card.
  • You are creating the front of the card only.
  • In making your card, you must use For Loop at least once, use stylized text fonts for a message, create and use variables, and use the random( ) function to create some variations at each start of the code.
  • Think about whether some elements in motion could be included.
  • Use the Hallmark link below as well as google search for ideas.
  • Create a styled webpage using the basic wireframe shown below as a guide.
  • Use camelCase for variable, function names, or where ever appropriate. Make sure to give a TITLE to the website, use a favicon, and write a meta description in the head section.

  • Comment sections of your code in all files.

  • Answer the vocabulary and study questions from this lesson. All descriptions must be in your own words and relevant in regards to our class.

  • Advanced: Create buttons to add or initiate colors/actions on your e-greeting card.

Resources

  1. Video: 13 For Loop
  2. Link: Hallmark Greeting Cards