Prasnya
Prasnya
Prasnya
Continue with Google
Question 17 - Week 4 Practice | Prasnya
Q17
00:00
16 Jul 2023
Q17.
Select an appropriate code snippet that can shift the given key `zanzamsayzam` by two places along the alphabet and generate the encrypted key.
A
``` alphabet = 'abcdefghijklmnopqrstuvwxyz' key = 'zanzamsayzam' encrypt_key = '' for i in key: encrypt_key = encrypt_key + alphabet[((alphabet.index(i)) + 2) % 0] print(encrypt_key) ```
B
``` alphabet = 'abcdefghijklmnopqrstuvwxyz' key = 'zanzamsayzam' encrypt_key = '' for i in key: encrypt_key = encrypt_key + alphabet[((alphabet.index(i)) + 2) % 25] print(encrypt_key) ```
C
``` alphabet = 'abcdefghijklmnopqrstuvwxyz' key = 'zanzamsayzam' encrypt_key = '' for i in key: encrypt_key = encrypt_key + alphabet[((alphabet.index(i)) + 2) // 26] print(encrypt_key) ```
D
``` alphabet = 'abcdefghijklmnopqrstuvwxyz' key = 'zanzamsayzam' encrypt_key = '' for i in key: encrypt_key = encrypt_key + alphabet[((alphabet.index(i)) + 2) % 26] print(encrypt_key) ```
Save
Check
Details
Q17
00:00
16 Jul 2023
Q17.
Select an appropriate code snippet that can shift the given key `zanzamsayzam` by two places along the alphabet and generate the encrypted key.
A
``` alphabet = 'abcdefghijklmnopqrstuvwxyz' key = 'zanzamsayzam' encrypt_key = '' for i in key: encrypt_key = encrypt_key + alphabet[((alphabet.index(i)) + 2) % 0] print(encrypt_key) ```
B
``` alphabet = 'abcdefghijklmnopqrstuvwxyz' key = 'zanzamsayzam' encrypt_key = '' for i in key: encrypt_key = encrypt_key + alphabet[((alphabet.index(i)) + 2) % 25] print(encrypt_key) ```
C
``` alphabet = 'abcdefghijklmnopqrstuvwxyz' key = 'zanzamsayzam' encrypt_key = '' for i in key: encrypt_key = encrypt_key + alphabet[((alphabet.index(i)) + 2) // 26] print(encrypt_key) ```
D
``` alphabet = 'abcdefghijklmnopqrstuvwxyz' key = 'zanzamsayzam' encrypt_key = '' for i in key: encrypt_key = encrypt_key + alphabet[((alphabet.index(i)) + 2) % 26] print(encrypt_key) ```
Save
Check
Details