Question: ' ' ' Add your name here Final Script June 2 0 2 1 ' ' ' import re print ( Final Script )

'''
Add your name here
Final Script
June 2021
'''
import re
print("Final Script")
with open("mem.raw", 'rb') as target: # assumes that mem.raw is in the same folder as script
contents = target.read() # read the entire contents of the file
txt = re.sub(b"[^A-Za-z']", b'', contents) # strip all non alpha characters
txt = txt.lower() # convert all to lower case
txt = txt.decode("utf-8") # convert to simple ASCII
wordList = txt.split() # Create a list of possible words
print(len(wordList))
# Determine the number of occurrences of the following possible words found in the wordList
kernelCount =0
encryptCount =0
fairwitnessCount =0
for word in wordList:
if word == "kernel":
kernelCount +=1
elif word == "encrypt":
encryptCount +=1
elif word == "fairwitness":
fairwitnessCount +=1
# Print the number of occurrences of each possible word
print("kernelCount: ", kernelCount)
print("encryptCount:", encryptCount)
print("fairwitnessCount: ", fairwitnessCount)
---> This is my current code. The mem.raw file and the script are in the same file together in my directory. All it does is stop at "Final Script" in the debug i/o and doesnt do anything else. I cant modify the starting script and im not sure what is causing the pause. pretty much everything below final script does not generate.

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 Programming Questions!