I have been working on a program that is meant to encrypt messages inputted by the user. After the encryption process is finished, I would like the program to prompt the user to choose whether they want to encrypt another message or not.
option2 = int(input('Would you like to encrypt another message? (Yes = 1 and No = 2)'))
while option2 not in [1, 2]:
print 'Please type 1 or 2.'
option2 = int(raw_input())
while True:
option2 = int(raw_input())
if option2 == 1:
option1 = int(input('Which encryption method would you like to use? 1 = Across (NOPQ ...) and 2 = Backwards (ZYXW ...)'))
while True:
option2 = int(raw_input())
if option2 == 2:
break
This code results in
"ValueError: invalid literal for int() with base 10: ''"
an error I have never before encountered. How do I fix this?