[Tutor] role playing game - help needed

Alan Gauld alan.gauld at btinternet.com
Tue Dec 7 10:44:57 CET 2010

"Al Stern" <albstern at gmail.com> wrote

> attributes = {"strength": 0, "health": 0, "wisdom": 0, "dexterity": 
> 0}
> How do I set the variable for available_points?
> available_points = MAX_POINTS - (not sure what goes here)

Check the mail from Robert Sjoblom, he gives you the necessary clues.
You can check the archive a few weeks back(21st Nov) for his question
too and get some alternative options and discussion.

> attributes["strength"] = input("\nHow many points do you want to 
> assign to
> strength?: ")
> Please let me know if this isn't advisable.  It seems to work on the
> surface.

Close, but remember that input() returns a string. You need numbers
so you need to convert strings to integers.


Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list