Improving this program

Character creating program ie Dungeons and Dragons.
Player has 30 points to spend on 4 attributes - strength, health, wisdom, and dexterity.
Player should be able to spend points from the pool on any attribute and should be able to take points from an attribute and put them back into the pool.
Currently i'm able to deduct points how do you return it back to the pool?
Also is there an easy method from preventing the player from entering more points than what the pool has?

I would take the whole section where you're asking for attribute points and enclose it inside of a while loop. Lets say you establish your initial variables

pool=30
health = 0
etc...
AllDone = False

Now open up a while loop that will continue until AllDone = True.

while AllDone != True:
# Ask for the strength attribute
answer = raw_input("strength: ")
# Now do some input validation
if answer > pool:
print "That's too much, dog."
continue # This will make it start over at the beginning of the while loop
strength += answer
# Now do the same thing for the other attributes. At the end of
# the loop you should only have valid answers in your variables
# Set AllDone to True so you wont send the user back through the
# Loop

What else am I missing?
When I ran the program for example enter 10 for strength points it returns back - "That's too much."

pool = 30
strength = 0
health = 0
wisdom = 0
dexterity = 0
choice = None
AllDone = False
while AllDone != True:
# Ask for the strength attribute
answer = raw_input("How much strength points you are requesting: ")
# Now do some input validation
if answer > pool:
print "That's too much."
continue # This will make it start over at the beginning of the while loop
strength += answer
# Ask for the health attribute
answer = raw_input("How much health points you are requesting: ")
# Now do some input validation
if answer > pool:
print "That's too much."
continue # This will make it start over at the beginning of the while loop
health += answer
# Ask for wisdom attribute
answer = raw_input("How much wisdom points you are requesting: ")
# Now do some input validation
if answer > pool:
print "That's too much."
continue # This will make it start over at the beginning of the while loop
wisdom += answer
# Ask for dexterity attribute
answer = raw_input("How much dexterity points you are requesting: ")
# Now do some input validation
if answer > pool:
print "That's too much."
continue # This will make it start over at the beginning of the while loop
dexterity += answer

It took me a second to figure this one out...and I only knew the answer because I have been reading these boards. As you can imagine, I am fairly new to Python also.

raw_input accepts a string from the user. So when the user types in 10 for his answer, python creates a string with a 1 and a 0 in it. When you compare answer to pool you are comparing a string to an integer. You need to convert the users answer into an integer. Here is some code to demonstrate.

When I run the code that you provided in your last sample I get a different error. I believe the reason is because you're not properly passing arguments to your getInt function. Look at line 43, 46, 49, etc. You have more left parenthesis than right parenthesis and that is probably because you don't want to have the raw_input on those lines. I think you just want to pass the string, the max, and the current.

Ok I fixed the parenthesis issue. Ran the program got this error msg
NameError: name 'current' is not defined
So later on I added current = 0
Reran the program inserted 10 points for strength outputs
How much strength points do you want?: 10
10

pool = 30
strength = 0
health = 0
wisdom = 0
dexterity = 0
choice = None
AllDone = False
while AllDone != True:
# Ask for the strength attribute
answer = raw_input("How much strength points you are requesting: ")
# Now do some input validation
if int(answer) > pool:
print "That's too much."
continue # This will make it start over at the beginning of the while loop
strength += answer
else:
print "Strength points you have",int(answer)
# Ask for the health attribute
answer = raw_input("How much health points you are requesting: ")
# Now do some input validation
if int (answer) > pool:
print "That's too much."
continue # This will make it start over at the beginning of the while loop
health += answer
else:
print "Health points you have:", int(answer)
# Ask for wisdom attribute
answer = raw_input("How much wisdom points you are requesting: ")
# Now do some input validation
if int(answer) > pool:
print "That's too much."
continue # This will make it start over at the beginning of the while loop
wisdom += answer
else:
print "Wisdom points you have:", int(answer)
# Ask for dexterity attribute
answer = raw_input("How much dexterity points you are requesting: ")
# Now do some input validation
if int(answer) > pool:
print "That's too much."
continue # This will make it start over at the beginning of the while loop
dexterity += answer
else:
print "dexterity points you have:", int(answer)

For example -
How much strength points you are requesting: 10
Strength points you have 10
How much health points you are requesting: 10
Health points you have: 10
How much wisdom points you are requesting: 10
Wisdom points you have: 10
How much dexterity points you are requesting: 10
dexterity points you have: 10

I started to write up something to demonstrate working code but my wife is being a complete pain in the butt right now. She wont give me even one more second to fix some of the bugs in this code so this will have to do. Sorry. Blame her.

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...