ptn [EMAIL PROTECTED] wrote:
PASCAL --PYTHON
5 div 2 -- 5/2
better: 5//2
The behaviour of 5/2 varies according to command line options and/or
__future__ imports. e.g. If you start Python with the -Qwarn option 5/2
will generate a warning; if you start Python
On Jul 2, 2:40 pm, Dustin MacDonald [EMAIL PROTECTED] wrote:
Hi everyone.
This is my first time posting to this newsgroup, and although I
maintain my netiquette I might've missed something specific to the
newsgroup, so hopefully you can avoid flaming me if I have :) I
apologize for the
Problem 6: big_randomized_int can only have values in 0, 1, ..., 98,
99. So small_randomized_int will have the value 0, always.
Perhaps you meant:
small_randomised_float = big_randomized_int / 100.0
small_randomized_int = Round(small_randomized_int, 2)
# Round that
In article [EMAIL PROTECTED],
Mark Peters [EMAIL PROTECTED] wrote:
.
.
.
Square brackets indicate the index into a sequence (like a list)
I'm wary of this line, especially in isolation. I hope it reduces,
rather than
On Jul 3, 9:04 am, Dustin MacDonald [EMAIL PROTECTED] wrote:
And Cameron: Ah, yes. It does reduce the confusion. I do know that
square brackets are used for *creating* a dictionary (blah = [A,
B, C],
That's a list, not a dictionary.
so I figured the same would apply to accessing it (which
Ah. Thank you everyone. Sorry for not replying earlier, real life got
in the way :)
Gerry Herron, Tim Delaney, Mark Peters: Thank you. Switching from
parentheses to square brackets fixed the code, and yes, Tim, you were
right. It was a list I was working with. And thanks for those links
Tim.
Dustin MacDonald wrote:
Hi everyone.
This is my first time posting to this newsgroup, and although I
maintain my netiquette I might've missed something specific to the
newsgroup, so hopefully you can avoid flaming me if I have :) I
apologize for the length of this post but I figure the more
Dustin MacDonald wrote:
[code]
randomizing_counter = 0
# Put the loop counter for the randomizing to zero.
until_val = 36
# Set the until val to 36. We'll compare them to make sure we're not
at the end of our wordlist_both.
while randomizing_counter until_val:
big_randomized_int
**weights_array(randomizing_counter) = small_randomized_int
The starred line is the one getting the error message: SyntaxError:
can't assign to function call
Now, I do understand what this means. I'm trying to assign to a
function instead of the value that the function should