Friday, November 30, 2018

Turn, Turn, Turn

CIT 1
Google Classroom 

Which direction does Tracy face when starting? What 2 commands can you use to make Tracy face a different direction(turn)? What number will turn Tracy completely around?
List of Commands
right(90)
left(90) 



CIT 2

Google Classroom 

What can you do to teach Karel new commands? Why?
1.4. Functions in Karel But what exactly are functions? One way of thinking about functions is to think of them being little blocks of commands that Karel knows by a single name. 

For example, if we wanted Karel to get the newspaper, we could say "Karel, get the newspaper." 

Karel knows that getNewspaper() means to go outside, go to the end of the driveway, pick up the newspaper, and bring it back. Similarly, in our code, we can combine or abstract away many instructions into a single function call.
What is the purpose of the selector in a CSS rule? Write 2 examples of selectors?
  • The selector points to the HTML element you want to style.
  • CSS selectors are used to "find" (or select) HTML elements based on their element name, id, class, attribute, and more.
  • The element selector selects elements based on the element name.
  • You can select all <p> elements on a page like this (in this case, all <p> elements will be center-aligned, with a red text color):
  • Element selectors are written with out brackets. For example:
  

No comments: