Case Study 2:
1. def scramble2Encrypt(plainText) :
2. evenChars = ""
3. oddChars = ""
4. charCount = 0
5. for ch in plainText:
6. if charCount % 2 == 0:
7. evenChars = evenChars + ch
8. else:
9. oddChars = oddChars + ch
10. charCount = charCount + 1
11. cipherText = oddChars + evenChars
12. return cipherText
-Refer to the code in the accompanying case study 2. What is the name of the % operator used on line 6?
A) Division
B) Modulo
C) Cipher
D) Rail fence
Correct Answer:
Verified
Q6: Case Study 1:
1. >>> name = "Roy
Q7: What is the [:] operator called?
A) Cut
B)
Q8: What is the result of the following
Q9: What method can be used to surround
Q10: What function converts a character to its
Q12: Case Study 2:
1. def scramble2Encrypt(plainText):
2. evenChars =
Q13: Python uses the _ function to ask
Q14: When implementing a substitution cipher in Python,
Q15: When implementing the Vigenère cipher, which step
Q16: The concatenation operator joins two strings and
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents