Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO
3.37K subscribers
1.13K photos
3 videos
17 files
373 links
Main channel https://t.me/Coding_000
Contact Admin 👉 @ILOVEU_143 for booking your exam slots
Web- https://coding000.github.io/Projects/
💯% clearance in any placement exams
OffCampus -https://t.me/Offcampus_000
Discussion- https://t.me/exams_discussion
Download Telegram
Guys...questions.. are difficult...
I will try to post...all pls wait...😊
3
def encrypt_decrypt(message, key_phrase):
    words = message.split()
    key_words = key_phrase.split()
    reversed_key_words = key_words[::-1]
    result = []
    for i in range(len(words)):
        if i < len(key_words):
            current_key_word = reversed_key_words[i]
        else:
            current_key_word = reversed_key_words[i % len(key_words)]
        result.append(words[i] + current_key_word)
    return ' '.join(result)

if name == 'main':
    message = input("Enter message: ")
    key_phrase = input("Enter key phrase: ")
    print(encrypt_decrypt(message, key_phrase))



Python3
👍5🔥1
decryptmessage

Guys plagiarism will be checked so please change method order and variable name 

Share @Coding_000❤️
1🔥1
🔥To Apply  For Latest Jobs and Internships and Offcampus links

🙋 Please Check
👇

https://t.me/Offcampus_000
1👍1