Thanks for the advice. I think I have the dictionary function set up right
now although I'm still not clear why it is better than the list.
attributes = {"strength": 0, "health": 0, "wisdom": 0, "dexterity": 0}
I think my next task is to set up a while function based on when
available_points dro
work on the
surface.
On Mon, Dec 6, 2010 at 1:16 PM, Alan Gauld wrote:
>
> "Al Stern" wrote
>
>
> Thanks for the advice. I think I have the dictionary function set up right
>> now although I'm still not clear why it is better than the list.
>>
>> at
"C:\Users\Public\Documents\My Python programs\role_playing_game1.py",
line 8, in
keys = attributes.viewkeys()
AttributeError: 'dict' object has no attribute 'viewkeys'
On Tue, Dec 7, 2010 at 3:44 AM, Alan Gauld wrote:
>
> "Al Stern" wrote
>
> at
call last):
File "C:\Users\Public\Documents\My Python programs\role_playing_game1.py",
line 26, in
point_total += val
TypeError: unsupported operand type(s) for +=: 'int' and 'str'
On Tue, Dec 7, 2010 at 10:06 AM, Peter Otten <__pete...@web.de> wrote:
+= val
print ("\nThis is how you have chosen to allocate your 30 points.")
print ("\nStrength:",(attributes["strength"]))
print ("Health:", (attributes["health"]))
print ("Wisdom:", (attributes["wisdom&quo
This was another execise in my book. Following is my code for a program
that uses dictionaries to find and edit pairs of fathers and sons. The
program works right up to the final step which is to find out if any given
father is actually a grandfather to someone else in the dictionary. I set
up m
print ("\nSorry.", grandfather, "is not a grandfather. Try
again.")
Thanks all.
_
www.electronsbaseball.com
-Original Message-
From: David [mailto:bouncingc...@gmail.com]
Sent: Saturday, December 11, 2010 6:35 PM
To: Al Stern
Cc: tutor@