Hi all.  My name is Al Stern.  I am an absolute beginner to programming and 
based on what I'd read, decided to try Python as my 1st language.  I am 
starting with a book called Python Programming for the Absolute Beginner by 
Michael Dawson.  The book has been pretty good and up to this point, I have 
grasped all the concepts it has covered.  At the end of each chapter, there are 
a number of challenges you need to complete before moving on.  Problem is, I 
have gotten stumped on one in Chapter 5: Lists and Dictionaries.

I'm not sure exactly how this mailing list works but was hoping someone here 
could give me some insight as to how to proceed.  Apologies if I am not posting 
the following in the correct format.  I just copied and pasted.)  Feel free to 
point me in the right direction if there are instructions as to how to do it.

Here is the challenge: Write a Character Creator program for a role-playing 
game. The player should be given a pool of 30 points to spend on four 
attributes: Strength, Health, Wisdom, and Dexterity. The >player should be able 
to spend points from the pool on any attribute and should also be able to take 
points from an attribute and put them back into the pool.

I think I did ok setting up the variables but haven't figured out where to go 
from there.

Here is what I have (along with my latest error message).  Thanks in advance.

# character creator / role playing game
# have 30 total points to work with

# set variables

attributes = ["strength", "health", "wisdom", "dexterity"]
points = [0,0,0,0]
MAX_POINTS = 30
available_points = MAX_POINTS - sum(points)

print("""
Our hero will need strength, health, wisdom and dexterity to survive.
You will have a limited amount of points to 'spend' on these attributes.
Use them wisely.  His life depends on it.
"""
)

# point allocation

print ("You have", available_points, "points available to use.")

for x in range(len(attributes)):
  print ("\t",attributes[x], points[x])

for x in range(len(attributes)):
    point_choice = input("\n\nHow many points do you want to assign to " +  
attributes[x]  + "?: ")


______________________
Alan Stern

Rising Realty
1820 W. Webster Ave #307
Chicago, IL 60614

(W)773-395-9999
(F)773-395-9553
(C)773-502-2556

www.risingrealty.com<http://www.risingrealty.com/>
Statement of Confidentiality
The contents of this e-mail message and its attachments are intended solely for 
the addressee(s) hereof. In addition, this e-mail transmission may be 
confidential and it may be subject to privilege protecting communications 
between attorneys or solicitors and their clients. If you are not the named 
addressee, or if this message has been addressed to you in error, you are 
directed not to read, disclose, reproduce, distribute, disseminate or otherwise 
use this transmission. Delivery of this message to any person other than the 
intended recipient(s) is not intended in any way to waive privilege or 
confidentiality.  If you have received this transmission in error, please alert 
the sender by reply e-mail; we also request that you immediately delete this 
message and its attachments, if any. Rising Realty reserve the right to monitor 
all e-mail communications through their networks.


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to