# File: moWeDinos.py # Author: Dr. Gibson # Date: 9/21/2016 # Section: N/A # E-mail: k.gibson@umbc.edu # Description: # This file contains python code that asks the user a few # questions about a dinosaur, predicts whether it is # dangerous, and then prints out a response to the user. def main(): # tell the user what to respond with print("Please answer the following questions with 'yes' or 'no'") # get information from user about dinosaur hasClaws = input("Does the dino have claws? ") isHerb = input("Does your dino exclusively eat plants? ") isCharge = input("Is it running at your face right now? ") reallyLoud = input("Is the dino screaming at you? ") print() # blank space to separate questions from responses # dangerous dino characteristics and responses if hasClaws == "yes": print("The dino has claws. Hide. Run. Pray. Cry. :(") if isCharge == "yes": print("Goodbye world.") if reallyLoud == "yes": print("Cover ears. Hope nothing else happens while you cower.") # only case of safe dinosaur if isHerb == "yes" and reallyLoud == "no" and isCharge == "no" and hasClaws == "no": print("You're safe.... for now.") # otherwise dinosaur is dangerous else: print("Hello darkness, my old friend.") main()