Break the chest open you didnt open or leave the

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

View Full Document Right Arrow Icon
> 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)
Image of page 2

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

View Full Document Right Arrow Icon
#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)
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern