Week 2 Notes
Week 2 Notes
Section 1-2:
- Lists are used to organize data
- Split() splits lists and join() joins the lists toghether
- In the AP Exam the indexing starts at 1 rather than 0
- You can display data in Javascript through a function
- You can convert javascript output to html in order for it to look good
- Dictionaries store both a key and value
- Temporary variables can be used to set a value and change that value without affect the first variable
- Const in java sets a variable which cannot be changed
- Data can be pulled from lists
Section 3-4:
- Modulus operator gives the variable after division
- Concatination is the combination of strings
- You can find the length of a string by using the len function in javascript
- Psuedocode is code without a language that gives instructions
Section 5-7:
- Boolean is True(1) and False(0)
- Boolean operators produce certain numbers
- Algorithm is a set of instructions that accomplish a task
- Conditionals appear everywhere
- Selection is driven by conditionals
Section 8-10:
- Lists can be used to store data
- Indexes count an organize data in a list
- Iteration is repeating a function multiple times
- A condition is telling when a system should stop running
- You can use a for loop for element in list Section 9 and 11:
- Algorithm is a set of commands that complete a task
- Human steps in code
- Algorithms can be used for iteration or selection
- There are benefits and draw backs to all algorithms Section 12-13:
- New parameters and arguments give a different output
- You call a function, define it then call it then put in your parameters
- Insert values into a function for a certain output
- Splice function splits up different parts of a string
- Its a pain to rewrite code multiple times rather than defining it as a function
- Modularity is needed for large coding projects