GOAL: Students will be able to…
- Explain why it is important to indent code
- Identify proper indentation
- Modify a program to have proper indentation
- Write programs with proper indentation
|Indentation||Indentation is the visual structure of how your code is laid out. It uses tabs to organize code into a hierarchy.|
|Programming Style||The way your code is written is the style. It covers the aspects of the code that goes beyond whether or not it just works.|
DO THE FOLLOWING IN ORDER:
- Do 1.14.2 Quiz: Which Control Structure?
- Which is easier to read: indented code or unindented code?
- What are some things we can do in our code to have good programming style?
- Do Now: Get it from your teacher–Share your solutions with a partner to compare and contrast the various results.
- Think about English rules regarding indentation and new paragraphs.
- What purpose does indentation serve in reading and writing?
- How do these rules apply to programming?
- Watch 1.15.1 How to Indent Your Code
- Examine 1.15.3 Dance and Clean Karel. How can you use the gray dotted lines to guide your indentation?
- Work individually or in pairs to complete 1.15.4 Diagonal and 1.15.5 Staircase–SHOW ME
- 1.15.6 Karel Exercises Badge–Did you get it? SHOW ME
- Be sure to use debugging strategies so that your code is reusable in all of Karel’s worlds.
- FYI: CodeHS Online Textbook–use this as a resource
- BEFORE YOU LEAVE, WRITE ABOUT THE FOLLOWING in the Word Online file named Web Apps & Coding for this class (you will write in this file daily):
- How is indentation used in programs? What are the rules for proper indentation?
- Why is it important to use proper indentation?
- Why is good programming style important?
- Write pseudocode for either Diagonal or Staircase using correct indentation.