Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Mod ale 1 1 Activity ENGR 102 - Fall 2021 Module 11 Activity Instructions This is an individuai activity on Canvas; however, you may work

image text in transcribed
Mod ale 1 1 Activity ENGR 102 - Fall 2021 Module 11 Activity Instructions This is an individuai activity on Canvas; however, you may work with others to discuss soiution methods. You may use Python, scratch paper, iecture siides found on Canvas, and NumPy's Quickstart tutoriai. You may NOT use the in ternet to search for heip. You are expected to write your own code, as needed, but you do not need to submit it. A Caesar cipher is a type of substitution cipher in which each letter of the message is replaced by a letter some fixed number of positions down the alphabet. For example, the word "fox" using a left shift of 3 would be written as "clu". Deciphering the word is done in reverse, by using a right shift of 3. Plain: abcdefghijklmnopqrstuvwxyz Cipher: xyzabcde fghij klmnopqrstuvw For this activity, write the Python code to decipher the hidden message "uwt lwfrrnslnxkzs", written in all lowercase letters. To crack the code, download the file modulellactivity.txt which contains 10000 integers between 1 and 26, one per line. To calculate the key, you will first need to rearrange the numbers into a 100 x 100 matrix, with the first 100 numbers as the first row. The key is a right shift of the sum of the last five numbers in the sixth row, plus the average of all of the numbers rounded down (to the nearest whole number} in the 251\" row, plus the mode (the most common number) in the 75'\" column. Your code should print the deciphered message to the screen. As a challenge, try solving the puzzle without looking at the file! Some helpful functions you may want to use: 0 mystr . strip () - removes whitespace (like \ ) at the beginning and end of mystr o mylist . index (a) - returns the index of value a in mylist, can also be used with strings - The Indexing, Slicing and Iterating section in NumPy's Quickstart tutorial

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions