This is an old revision of the document!


01. String manipulation

First, let's familiarize ourselves with Python's string type:

  • Read a string input from the user's console (hint: ''input()''); next sub-tasks will use this value and apply various string transformations on it;
  • Print the reversed string (e.g., “hello world” ⇒ “dlrow olleh”); hint: there are at least 3 built-in ways to do this in a single line of code ;)
  • Print the same string in “aLtErNaTe CaSe” (if you're out of ideas, simply use the ''for'' loop);
  • Finally: encrypt the given message using Caesar's Cipher (aka, replace each of its alphabet letters with the ones n positions to the: right for encryption, left for decryption); use the number 17' for testing!
ii/labs/s2/01/tasks/01.1679154730.txt.gz · Last modified: 2023/03/18 17:52 by florin.stancu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0