Instructions:
Submission:
You must submit the screenshot of these questions to verify your completion
Q1. Use Python Interpreter and write the code. Submit the screenshot and explain the answer
>>>name = “Elliott Hutchinson”
Write the output and explain why
Q2. Type the following program and explain the outcomes.
data = “Hi there!”
for index in range(len(data)):
print(index, data[index])
Q3: Use the Python software and write the following code. Run the program and fix the errors (if any). You must submit the screenshot.
code = input(“Enter the coded text: ”)
distance = int(input(“Enter the distance value: ”))
plainText = “ ”
for ch in code:
ord value = ord(ch)
cipherValue = ord value − distance
if cipherValue < ord(‘a’):
cipherValue = ord(‘z’) −
(distance − (ord(‘a’) − ordvalue − 1))
plainText += chr(cipherValue)
print(plainText)
