Being able to troubleshoot scripts is a critical skill that needs to be developed and a good IDE will provide feedback to help you avoid and correct syntax errors. Review the script below and determine which lines are producing the syntax errors.
zoo = ['Lion', 'Zebra', 'Giraffe', 'Hippo'] for animal in zoo: if animal == "Lion': print "Alex the " + animal elif animal == 'Zebra': print "Marty the " + Animal elif animal == 'Giraffe': print "Melman the " + animals elif animal == 'Hippo': print "Gloria the " + animal
Part 3 Implementation:
As the Lead Engineer in the ultra-secret spy organization, you have been tasked with assigning Code Names for all Secret Spy Missions.
Your mission is to complete the attached script.
# Import the Random Module import random # Code Name Lists alpha = ['Crimson', 'Phantom', 'Zephyr', 'Palisade', 'Skyfall'] omega = ['Whirlwind', 'Gatecrasher', 'Iceberg', 'Zealot', 'Element'] # 1.CREATE FOR LOOP HERE # HINT: You will have a nested For loop. # 2. The Random Code Names will print here. # HINT: Remember your indentions. print ("Operation: " + random.choice(alpha) + " " + random.choice(omega))
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here