[Tutor] Checksum program
lezlie.kline at gmail.com
Wed Mar 23 14:09:53 CET 2011
I'm trying to work out the bugs in a program for calculating the checksum
(modulo 256) of an input string. I'm testing it with my full name and I'm a
beginner with Python. Here's what I have so far.
print"This program creates a checksum for a message."
name=raw_input("Please enter the message to encode: ")
for i in range(len(message)):
print"The value of message[i] is ", message[i]
print"The value of the message is ", output
print"The checksum is ", checksum
I know I'm offbase somewhere, but I'm not understanding some parts of the
accumulator part of the program. I need it to work with the message[i]
intact. In other words, I need the pseudo code to go something like this:
using length in range function accumulate ASCII numbers
I'd appreciate any help offered as I'm "pulling out my hair."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor