Exercise 6 Derive a Python function named code that take a character chain s and returns another coded chain. The code is calculated by taking each pair of consecutive letters and changing the order...


please use your own code and some comments. thank you


Exercise 6<br>Derive a Python function named code that take a character<br>chain s and returns another coded chain. The code is<br>calculated by taking each pair of consecutive letters and<br>changing the order in the pair (spaces, ponctuation, etc. are<br>traited like letters).<br>Test your function with a main program or in the interpretor.<br>For example:<br>>>> code('secret message')<br>'esrctem seaseg'<br>>>> code('Message')<br>'eMssgae'<br>

Extracted text: Exercise 6 Derive a Python function named code that take a character chain s and returns another coded chain. The code is calculated by taking each pair of consecutive letters and changing the order in the pair (spaces, ponctuation, etc. are traited like letters). Test your function with a main program or in the interpretor. For example: >>> code('secret message') 'esrctem seaseg' >>> code('Message') 'eMssgae'

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here