Home API Notes

Notes

Algorithms

  • An algorithm is a set of instructions that complete a given task
  • There are three key parts to an algorithm: sequencing, selection, and iteration
  • Sequence: The order in which a statement is carried out
  • Selection: The ability to allow an algorithm to carry out a conditional based condition
  • Iteration: A loop that executes code until a given condition is met

Strings

  • Each coding language has its own relative methods, procedures, and functions
  • String is an ordered sequences of characters

Unit 3.3.1 Hacks

Parts of an Algorithm

Sequencing: 1, 2, 3, 4, 5

Selection: 3

Iteration: 4

Code Evaluation

  • The result is 3.0
num1 = 5
num2 = num1 * 3
num3 = num2 / num1 * (9 % 2) * 4
result = (num3 % num1 + num2) % num3 * 3 / 5
print(result)
3.0

Crossword Puzzle Answers 1) Iteration 2) Selection 3) Sequence

Unit 3.4 Hack