私は、「プログラムがメッセージを暗号化するために使用する8つのキーの文字キーを生成するプログラムの部分を開発する」というのは非常に混乱しています。私たちは暗号化プログラムを作成しようとしています。私がこれまで持っているコード:今何をする必要がありますか?
ファイル
def fileopen():
filename=input('What is the name of the file: ')
with open(filename) as yarr:
contents=yarr.read()
return contents
メニュー
print ("Hello, welcome to the encryption/decryption program")
print ("1 - Encryption")
print ("2 - Decryption")
print ("3 - Exit")
choice=input ("Enter a Number")
while True:
if choice=="1":
print("Encryption Selected")
filecontents=fileopen()
print(filecontents)
break
elif choice=="2":
print("Decryption Selected")
break
elif choice=="3":
print("Thank you, come again")
break
else:
choice=input("Incorrect number")
continue
私も混乱しています。 「8文字キー」とは何ですか?おそらく「8文字のキー」(つまり8文字のランダムな文字列)を意味しましたか? –