# File: dinoNeary.py # Author: Michael Neary # Date: 09/22/2016 # Section: Lecture 07 # Email: mneary1@umbc.edu # Description: # determine if a dinosaur is friendly or dangerous def main(): #greet the user print("This program will tell you the threat level of a dinosaur.") print("Enter '1' if yes, '0' if no.") #get the input from the user isHeavy = input("Does this thing weigh over 9000 pounds?: ") isCharging = input("Is this thing charging at you?: ") doesEatPlants = input("Does this thing eat plants?: ") isSmall = input("Can you hold this in your hand?: ") isDead = input("Is it lying motionless on the ground?: ") #determine what to do if dinosaur is safe if isDead == "1": print("Hit it with a stick!") if isSmall == "1": print("Name is fluffy and feed your cat to it") if doesEatPlants == "1": print("Get it a Peta bumper sticker.") #determine what to do if the dinosaur is dangerous if isDead == "0" and isHeavy == "1" and (isCharging == "1" or doesEatPlants == "0"): print("you gon' die") print("Enjoy your last few moments.") print("Stop reading this, and run!!!") else: print("Put it on a leash and go for a walk!") print("Either way, how did you end up here?") main()