####################################################################### # ADD EXCEPTION HANDLING TO THE FOLLOWING SECTION OF CODE # # The user must enter a correct code in order to proceed with the # # self destruct procedure. # # # # The script should force the user to enter a valid destruct code or # # or offer the option to abort the Self Destruct request entirely. # # Use the Exception Handling in the Section above as a reference. # ####################################################################### initiate = input("Enter Self Destruct Confirmation Code: ") # Compare Rank Codes if initiate == code: print ("Self Destruct Initiate Code: ACCEPTED") final_code = input("Enter Activation Code: ") if final_code == authorized_final: print ("Destruct Sequence Confirmed.") # 5. EXPLAIN THE SIGNIFICANCE OF THE x print (x, " seconds to Self Destruct.") # A. print ("ALL HANDS ABANDON SHIP - THIS IS NOT A DRILL") countdown(x) print ("Have a nice day!") print ("BOOM!") elif final_code == authorized_test: print ("Destruct Sequence Test Order Confirmed.") print ("THIS IS A DRILL - THIS IS A DRILL") print ("Timer Set to: " + x + " seconds.") else: print ("Destruct Sequence Aborted.")
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here