1. Write the encrypted text of each of the following words using a Caesar cipher
ID: 3665271 • Letter: 1
Question
1. Write the encrypted text of each of the following words using a Caesar cipher with a distance value of 3:
a python b hacker c wow
2. Assume that the variable data refers to the string “myprogram.exe”.
Write the values of the following expressions:
a data[2]
b data[-1]
c len(data)
d data[0:8]
e “gram” in data and “pro” in data
3 Assume that the variable data refers to the list [5, 3, 7]. Write the
values of the following expressions:
a data[2]
b data[-1]
c len(data)
d data[0:2]
e 0 in data
f data + [2, 10, 5]
g tuple(data)
Explanation / Answer
1. Write the encrypted text of each of the following words using a Caesar cipher with a distance value of 3:
a python ==> sbwkrq
b hacker ==> kdfhu
c wow ==> zrz
2. Assume that the variable data refers to the string “myprogram.exe”.
Write the values of the following expressions:
a data[2] ==> p
b data[-1] ==> Invalid Reference
c len(data) ==> 13
d data[0:8] ==> myprogra
e “gram” in data and “pro” in data ==> true
3 Assume that the variable data refers to the list [5, 3, 7]. Write the
values of the following expressions:
a data[2] ==> 7
b data[-1] ==> Invalid Reference
c len(data) ==> 3
d data[0:2] ==> 537
e 0 in data ==> false
f data + [2, 10, 5] ==> 5372105
g tuple(data) ==> [5, 3, 7]
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.