Question: Needs to be in python A checksum is a single number that can act as a kind of digital signature of a long string. Just
Needs to be in python
A checksum is a single number that can act as a kind of digital signature of a long string. Just like how two people will have different handwritten signatures, two strings can have two different digital signatures. There are many ways to calculate the checksum of any arbitrary string; the more complex the calculation, the less likely it is for two strings to have the same checksum value.
The second function you will write should be called checkSum. This function should take one input variable, which shall be a string. As output, the function should return the checksum of the input string (as a single integer value).
You will calculate the checksum as the sum of the Unicode values of each character in the string modulo 10. Recall the ord() function, when given a single character, returns the Unicode value of that character. (Hint: do not pass the entire string to the ord() function, it will not do what you want.)
Testing:
Build your own test cases to convince yourself it works. Think about edge cases! As an example:checkSum(cat)shouldreturn2. Why? Because(99+97+116)modulo10 is 2.

Specification A checksum is a single number that can act as a kind of "digital signature" of a long string. Just like how two people will have different handwritten signatures, two strings can have two different digital signatures. There are many ways to calculate the checksum of any arbitrary string, the more complex the calculation, the less likely it is for two strings to have the same checksum value. The second function you will write should be called checksum. This function should take one input variable, which shall be a string. As output, the function should return the checksum of the input string (as a single integer value). You will calculate the checksum as the sum of the Unicode values of each character in the string modulo 10. Recall the ord ) function, when given a single character, returns Page 3 of4 CS 105 Intro to Computing Non-Tech Fall 2017 function, it will not do what you want.) Build your own test cases to convince yourself it works. Think about edge cases! As an example: checksum (cat') should return 2. Why? Because (99+97+116) modulo 10 is 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
