From 299c4ccc96a6963b5e1cb0e7fb847b937f1c3c4a Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Wed, 26 Feb 2020 19:39:12 +0100 Subject: [PATCH] ROT working completely --- crypttool.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/crypttool.py b/crypttool.py index 396ab6f..1672f70 100644 --- a/crypttool.py +++ b/crypttool.py @@ -84,6 +84,7 @@ def fixedxor(string1 = '', string2 = ''): def rot(inputString, amount): outputString = '' + amount = int(amount) for char in inputString: resultChar = '' if char.isupper(): @@ -237,12 +238,12 @@ def base64prompt(): def rotPrompt(): choice = input('What kind of ROT do you want to perform? 1-25, or all: ') userInput = input('Please insert a string: ') - if type(choice) is types.IntType: - print(rot(userInput, choice)) + if choice == 'all': + for i in range(0, 26): + print(rot(userInput, i)) else: - for i in range(0, 26): - print(rot(userInput, i)) - + print(rot(userInput, choice)) + def translatePrompt(): print('1: Binary') print('2: Decimal')