samedi 7 août 2021

My LAN quiz python has unexpected behaviour

THIS IS MY CODE:

WG, G, WO, B, WB, O, WBr, Br = 1,2,3,4,5,6,7,8
    T568A = WG, G, WO, B, WB, O, WBr, Br
    for i in range(10):
        a = input("Enter the PO separated by comma's with correct capitalization here: ")
        if a == T568A:
           print("YOU ARE CORRECT:")
        else:
            print("YOU ARE INCORRECT,PLEASE TRY AGAIN")
    print("T58A PINOUTS ARE WG, G, WO, B, WB, O, WBr, Br = ", T568A)

THIS IS WHAT IT IS DOING

Enter the PO separated by comma's with correct capitalization here: WG, G, WO, B, WB, O, WBr, Br
YOU ARE INCORRECT,PLEASE TRY AGAIN
Enter the PO separated by comma's with correct capitalization here: 

THIS IS WHAT I WANT IT TO DO:

Enter the PO separated by comma's with correct capitalization here: WG, G, WO, B, WB, O, WBr, Br
YOU ARE CORRECT
Enter the PO separated by comma's with correct capitalization here: 

I have read the documentation and have double checked my spaces and indentation. i am trying to teach myself if else elif arguments while also creating a fun way for me to learn the t568a and t568b lan .

thank you all in advance for looking at my questions, if I have made mistake in my question please let me know so I can provide the right information.

Aucun commentaire:

Enregistrer un commentaire