ROT working completely

py3
Felix Pankratz 5 years ago
parent c15d362011
commit 299c4ccc96

@ -84,6 +84,7 @@ def fixedxor(string1 = '', string2 = ''):
def rot(inputString, amount): def rot(inputString, amount):
outputString = '' outputString = ''
amount = int(amount)
for char in inputString: for char in inputString:
resultChar = '' resultChar = ''
if char.isupper(): if char.isupper():
@ -237,11 +238,11 @@ def base64prompt():
def rotPrompt(): def rotPrompt():
choice = input('What kind of ROT do you want to perform? 1-25, or all: ') choice = input('What kind of ROT do you want to perform? 1-25, or all: ')
userInput = input('Please insert a string: ') userInput = input('Please insert a string: ')
if type(choice) is types.IntType: if choice == 'all':
print(rot(userInput, choice))
else:
for i in range(0, 26): for i in range(0, 26):
print(rot(userInput, i)) print(rot(userInput, i))
else:
print(rot(userInput, choice))
def translatePrompt(): def translatePrompt():
print('1: Binary') print('1: Binary')

Loading…
Cancel
Save