# Break the chest open you didnt open or leave the

• Homework Help
• 3

This preview shows pages 2–3. Sign up to view the full content.

> break the chest open!!! You didn't open or leave the chest, and consequently a magic spell turns you into a tiny lemur. Things could we worse, I guess. Game over. """ import random #Name and character name = input("What is your name?") character= input(name+ str(', are you a Warrior, Wizard, or a Programmer?')) #if length of name is less than 15 then use the format length = len(name) if length <= 15: print('.xX Welcome', name,'Xx.') else: print("Welcome", character, name)

This preview has intentionally blurred sections. Sign up to view the full version.

#Open Chest? Yes or no, no(end game) #action if statements if character == "Programmer": print("There is no treasure here for you. The real treasure is the time spent programming.") if character == "Warrior" or character == "Wizard": decsion= input('Would you like to open the chest or leave it alone') if decsion == 'Open': value =random.randint(1, 20) if value > 15: print("You open the chest to find a million dollars. Congrats!") elif (value >= 11) and (value <=15): print("You get 100 pancakes with ample mayple syrup") elif (value >= 6) and (value <=10): print("You open the chest to find TPS reports from a random buisness. Whatever.") elif (value >= 1) and (value <=5): print("You get eaten by a sharknado.") elif decsion == 'Leave': print('You lose. Should\'ve chosen the other option.') else: print("You didn't open or leave the chest, and consequently a magic spell turns you into a tiny lemur. Things could we worse, I guess. Game over.") else: print("Get a real job!", character)
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern