From Mock A · Paper 1: Written examination
12(b)1 mark
Give the line number where selection is used in the program in 12(a).
1 password = input("Enter password: ")2 attempts = 13 while password != "Plasmo7" and attempts < 3:4 password = input("Try again: ")5 attempts = attempts + 16 if password == "Plasmo7":7 print("Access granted")8 else:9 print("Locked out")State the line number where iteration begins. col1 col2 col3 col4row1 S . . #row2 # # . #row3 . . . .row4 # E # .Write the shortest sequence of moves from S to E.def classify_temp(t): if t < 10: return "cold" elif t < 25: return "mild" else: return "hot" readings = [8, 25, 17]for r in readings: print(classify_temp(r))State the output of this program.temps = [14, 18, 21, 19, 25]total = 0for t in temps: total = total + taverage = total / len(temps)print(average)State the output of this program.names = ["Ana", "Ben", "Cal"]scores = [72, 58, 91]for i in range(len(names)): if scores[i] >= 60: print(names[i], "pass") else: print(names[i], "retake")State the output of this program.def count_vowels(word): count = 0 for letter in word.lower(): if letter in "aeiou": count = count + 1 return count print(count_vowels("Robot"))State the output of this program.This paper is written by Plasmo in the style of the LRN GCSE Artificial Intelligence exam. It is not a past paper and is not produced or endorsed by the exam board.