Skip to main content

Python program that shifts the given alphanumeric string by a certain offset.

This Python program shifts the inputted string forward and backward by a certain offset number 'n' that can be negative or positive integer. This integer ranges from +25 to -25. However, there is a minor error in this program which is left up to the viewer for rectification.
The output of the program is shown below:

Comments

Popular posts from this blog

A Python program that counts the number of given word in a file.

This Python 2.7 program accepts a word (string) from user and counts the occurrence of that word in the file chosen by user. In this program, the words with a punctuation either at the beginning or at the end (like: But, ) is also considered if that word matches with the inputted word. Suppose, if the given word is 'it' and the file is 'alice_short.txt' then the output looks like: alice_short.txt :
It gives a particular root of the predefined polynomial equation. The root lies in the upper and lower bound prescribed by the user. The output appears as: