Question: ((python)) def checksum(string): A checksum is a way to verify that data transmission has occurred without data loss or corruption. This works by taking the

((python))

def checksum(string): """A checksum is a way to verify that data transmission has occurred without data loss or corruption. This works by taking the data that is about to be transmitted and creating some sort of summary value that is dependent on the data and then sending it along with the data. Once the data is received, the summary value can be recalculated using the same method and compared to the summary value that came with the data: if they match, all is well; if not, something went wrong.

This function will generate a simple checksum: add up the numerical codes that correspond to the letters of the string and then return this number"""

# Hint: look up what ASCII is and the python ord() function pass

def letter_frequency(string, letter): """This function reports back what proportion of 'string' is made up of 'letter' as a percentage rounded to two decimal places. As such, it has a range from 0.0 to 100 and a minimum step of 0.01""" # Hint: look up the Python round() function pass

def first_factor(number): """This function takes in a number and returns the first positive integer that evenly divides it (excluding 1 of course)""" pass

def is_prime(number): """Returns true if 'number' is prime and false otherwise""" # Hint: remind yourself of what it means for a number to be prime by looking # it up

# Hint: *DON'T* look up how to decide if a number is prime on the # internet, you will almost certainly find a bunch of really complicated # code that is overkill for this problem

# Hint: You have already implemented another function that can make this # problem easier (assuming you are doing these in order) pass

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!