Question: This is for python. 4 of the functions defined below are missing an implementation! Finish the following functions: 1. gen_consecutive_chars() 2. gen_key(password) 3. sub_decrypt(password, ciphertext)

This is for python.

4 of the functions defined below are missing an implementation! Finish the following functions: 1. gen_consecutive_chars() 2. gen_key(password) 3. sub_decrypt(password, ciphertext) 4. vig_decrypt(key, message) """

(Question 1, will post other 3 seperately.)

# 1. Implement gen_consecutive_chars() def gen_consecutive_chars(start=97, end=122): """Creates a string composed of all characters starting at unicode code point, start, up to and including unicode code point, end. The default values return lowercase 'a' through (and including) 'z' gen_consecutive_chars() # --> 'abcdefghijklmnopqrstuvwxyz' gen_consecutive_chars(start=65, end=66) # --> 'AB' :param start: the code point to start the sequence of characters :type start: int :param end: the code point of the last character included :type end: int :return: a string consisting of consecutive characters from start code point to end code point :rtype: str """ # implement this function! return '' def remove_letters(letters, s): """Removes every character in letters from string, s. :param letters: string of characters to be removed :type letters: str :param s: string that characters will be removed from :type s: str :return: a new string with all characters in letters removed from s :rtype: str """ new_s = '' for ch in s: if ch not in letters: new_s += ch return new_s def remove_duplicates(s): """Removes all duplicate characters in string, s :param s: string to remove duplicates from :type s: str :return: new string without duplicates :rtype: str """ new_s = '' for ch in s: if ch not in new_s: new_s += ch return new_s

I have no idea where to even start with implementing this function. Can I get a walkthrough? Thank you.

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!