Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.4 KB

Py-Intro-Exercise4.md

File metadata and controls

46 lines (35 loc) · 1.4 KB

Exercise 4

Write a fantasy game character creator!

  • Create a public repository on your GitHub profile
  • Clone it and add these instructions as README.md
  • Create a new file called creator.py
  • Ask the user for five character names
  • A character will randomly be a Warrior, Wizard or Potato
  • Each character has stats: Health, Strength and Magic
  • Each stat is random, between 5 and 10
  • Warriors will have triple Strength
  • Wizards will have triple Magic
  • Potatoes will have triple Health
  • Generate the team of five characters

Example of program output below. To keep the example short only 2 characters shown.

    $ py creator.py
    Welcome to the character generator!
    Let's name the brave adventurers:
    Character 1: Veera the Brave
    Character 2: Rauli the Fierce
    ...

    ***YOUR CHARACTERS ARE COMPLETE***
    "Veera the Brave" is a Wizard!
        Strength: 5
        Magic: 21
        Health: 9

    "Rauli the Fierce" is a Potato!
        Strength: 9
        Magic: 6
        Health: 24

    ...

    Happy adventuring!
  • Finally add, commit and push your work, then add a link to the thread of this message
  • Good luck, have fun!

OPTIONAL BONUS CHALLENGE

Make it so that there is a 10% chance that the stats are printed as binary, 10% chance that the states are printed as hex and 80% chance they are printed as decimals