"Al Stern" wrote
attributes = {"strength": 0, "health": 0, "wisdom": 0, "dexterity":
0}
MAX_POINTS = 30
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 c
> Joel Schwartz wrote:
>> Chris,
>>
>> Can you say more about number (7) in your list? What does "pass by value"
>> mean and what are the alternatives?
>
> Oh boy, is that a can of worms... and this is going to be a long post.
> You might want to go make yourself a coffee first :)
[snipped wall of
>> 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}
>>>
>>
>> Consider where you want to update the points for "health"
>>
>
>> 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 intege
Robert Sjöblom wrote:
>> Close, but remember that input() returns a string. You need numbers
>> so you need to convert strings to integers.
>
> Actually, input() only accept integers, consider the following:
input("input: ")
> input: d
>
> Traceback (most recent call last):
> File "", line
Apologies for all my questions. Up to this point I have been able to work
out most of the challenges but I seem to have hit a wall. Can't seem to
make any progress and completely frustrated.
I looked at the 11/21 discussion. From the documentation, I realized I
needed to set the variables to vi
Al Stern wrote:
> Apologies for all my questions. Up to this point I have been able to work
> out most of the challenges but I seem to have hit a wall. Can't seem to
> make any progress and completely frustrated.
>
> I looked at the 11/21 discussion. From the documentation, I realized I
> need
Steven,
Thanks for taking the time to write such a detailed and illuminating
response!
I learned programming in Pascal in college in the early 1980s and used
Fortran in grad school in the late 80s. That was pretty much the end of my
contact with programming until I began learning R last year and
I make a script to redirect a txt file from an external directory, but in
this directory I don't have permission to write, just to read data. So I
make this module:
import os, time,fnmatch
from xlwt import Workbook
from osgeo import ogr,gdal,osr
from dbf import *
gdal.AllRegister()
file_list = []
f
My other message was incomplete, it was a mistake: This is the correct one
2010/12/7 Susana Iraiis Delgado Rodriguez
> I make a script to redirect a txt file from an external directory, but in
> this directory I don't have permission to write, just to read data. So I
> make this module:
> import
On 7 December 2010 00:16, Steven D'Aprano wrote:
> Oh boy, is that a can of worms... and this is going to be a long post. You
> might want to go make yourself a coffee first :)
Great writeup and much appreciated :-).
Thx
Sander
___
Tutor maillist - T
On Tue, Dec 7, 2010 at 12:20 PM, Susana Iraiis Delgado Rodriguez <
susana.delgad...@utzmg.edu.mx> wrote:
> My other message was incomplete, it was a mistake: This is the correct one
>
> 2010/12/7 Susana Iraiis Delgado Rodriguez
>
> I make a script to redirect a txt file from an external director
> When I run the script I got the next error:
import crawler_shp
> Traceback (most recent call last):
> File "", line 1, in
> File "crawler_shp.py", line 105, in
> dbf = Dbf(d,new=False)
> File "C:\Python26\lib\site-packages\dbf.py", line 125, in __init__
> self.stream = file(f
Tried to use the documentation but still getting the errors...
The 1st one has to do with the available_points
# set variables
attributes = {"strength": 0, "health": 0, "wisdom": 0, "dexterity": 0}
MAX_POINTS = 30
available_points = MAX_POINTS - attributes.values()
keys = attributes.keys()
values
On 07/12/10 22:10, Al Stern wrote:
Tried to use the documentation but still getting the errors...
The 1st one has to do with the available_points
# set variables
attributes = {"strength": 0, "health": 0, "wisdom": 0, "dexterity": 0}
MAX_POINTS = 30
available_points = MAX_POINTS - attributes.value
Hello,
I have a strange problem with a piece of code I've written. It's a bit
overly complicated to make an example with, but the gist is below. But
in the example below, it works. However, in my example, when I call
the method from within the function, it returns something other than
what I expec
On 07/12/10 22:36, John wrote:
Hello,
I have a strange problem with a piece of code I've written. It's a bit
overly complicated to make an example with, but the gist is below. But
in the example below, it works. However, in my example, when I call
the method from within the function, it returns
Al Stern wrote:
> I used the following code and got the following error.
The result of input is always a string.
> attributes["strength"] = input("\nHow many points do you want to assign to
> strength?: ")
Say you type 42 when you run your script. Then the above assignment is
effectively
at
"John" wrote
I have a strange problem with a piece of code I've written. It's a
bit
overly complicated to make an example with, but the gist is below.
But
in the example below, it works. However, in my example, when I call
the method from within the function, it returns something other than
19 matches
Mail list logo