嘿,我正在为一个学校的项目做一些代码,想知道我如何能使它更小(这是我所拥有的)。。。在PersonName = input("Enter Name To Prove Your Identity: ")
Answer = input("Name Inputed Is " + PersonName + " Is This Correct(enter yes or no): ")
if Answer.lower() == "yes":
print("You May Continue " + PersonName + " ")
if Answer.lower() == "no".lower():
print("Please Reset Your Name")
PersonName = input("Enter Name To Prove Your Identity: ")
Answer = input("Name Inputed Is " + PersonName + " Is This Correct(enter yes or no): ")
if Answer.lower() == "yes".lower():
print("You May Continue " + PersonName + " ")
if Answer.lower() == "no".lower():
print("Please Reset Your Name")
PersonName = input("Enter Name To Prove Your Identity: ")
Answer = input("Name Inputed Is " + PersonName + " Is This Correct(enter yes or no): ")
if Answer.lower() == "yes".lower():
print("You May Continue " + PersonName + " ")
if Answer.lower() == "no".lower():
print("Please Reset Your Name")
PersonName = input("Enter Name To Prove Your Identity: ")
Answer = input("Name Inputed Is " + PersonName + " Is This Correct(enter yes or no): ")
if Answer.lower() == "yes".lower():
print("You May Continue " + PersonName + " ")
if Answer.lower() == "no".lower():
print("Please Reset Your Name")
PersonName = input("Enter Name To Prove Your Identity: ")
Answer = input("Name Inputed Is " + PersonName + " Is This Correct(enter yes or no): ")
if Answer.lower() == "yes".lower():
print("You May Continue " + PersonName + " ")
if Answer.lower() == "no".lower():
print("Please Reset Your Name")
PersonName = input("Enter Name To Prove Your Identity: ")
Answer = input("Name Inputed Is " + PersonName + " Is This Correct(enter yes or no): ")
if Answer.lower() == "yes".lower():
print("You May Continue " + PersonName + " ")
if Answer.lower() == "no".lower():
print(" ")
print("SORRY CAN'T START LAUNCH BECAUSE YOU CAN'T PROVE YOUR IDENTITY")
你可能知道这是分配的代码,如果你想让我把完整的代码ask放在注释中,我需要对其他部分做这个,所以我需要把它缩小。如果有人能给我一个新的代码,我会很感激的
谢谢;)