B 2.5.1 Worksheet 2 Python Answers
1. Character Frequency: Explanation: This code reads the file, converts all characters to lowercase, and counts the frequency of each alphabetic character using a dictionary. frequencies.get(char, 0) returns the current count for char or 0 if it's not in the dictionary yet. 2. File Encryption: Explanation: The caesar_cipher function encrypts the text by shifting each character by the given shift value. It handles...