Describe the different parts of an algorithm, sequencing, selection, and iteration in the image below

  1. Set item to number to search for.
  2. Get text number in the list.
  3. If number = item, display "item found"
  4. If he are more numbers in the list, go back to Step 2
  5. Display "item found"
  • Sequencing: order of how to do a process
  • Selection: allows algorithm to make a decision based on the status [if a condition is met]
  • Iteration: loop

Evaluating Code

Evaluate the arithmetic expression for this code

num1 = 5
num2 = num1 * 3
num3 = num2 / num1 * (9 % 2) * 4
result = (num3 % num1 + num2) % num3 * 3 / 5

3


Crossword Puzzle

Finish the crossword puzzle

  1. Iteration
  2. Selection
  3. Sequence

Challenge

string1 = "degree"
string2 = " passenger"
FinalString = string1 + string2
print(FinalString[2:9])
print(len(FinalString))
print(len(FinalString[2:9]))
gree pa
16
7

Quiz

  1. The length of the string
  2. False
  3. >

print("Hello World"[3:8])
lo Wo