U3Ch1L6_Intro To Programming
Purpose: Students use and modify a series of simple apps to get familiar with a small set of programming commands.
Activity: Log on to Code.org U3Ch1L6 Intro To Programming:
Guidelines:
Level 1 – Console Log: Run the Program - View the result in the Debug Console Window
Level 2 – SetProperty: Run the Program – What is the difference between “Console.log” & “SetProperty”
“Console.log” prints text in the Debug Console.
“SetProperty” changes the properties of elements on the screen.
Level 3 - onEvent: Run the Program – Explain how the “onEvent” block works? Be Specific. Do commands outside “onEvent” run different from those inside?
“onEvent” acts like a Conditional or If/Then statement.
Level 4 – setScreen: Run the Program – What allowed the screen to change?
A “setScreen(screenId) inside an onEvent allows the user to navigate between app screens.
Level 5 – playSound: Run the Program – How does “playSound” work? What does “//” do?
“playSound” will play a sound you pick from the Sound Library.
“//” are comments and don’t run but are used to help you understand your code.
Level 6 – randomNumber: Run the Program – How does “randomNumber” work?
“randomNumber” allows the computer to generate a different number.