[Solved] How can I ensure that my python Code Registers the row1 2 or 3 under a different segment of Code?


The problem is because you haven’t indented your code properly. Python code relies upon correct indentation to determine the order of processing for commands. Currently your code checks row1 value even if you didnt select row1, but you define row1 based on selecting it from the input. You need to indent the if statements under each choice selection like the following.

if choice == 1:
    row1 = input("Please choose either A1, B1 or C1 for your item: ")
    if row1 == "A1":
        //do something
    elif row1 == 'A2':
        //do something else etc...

2

solved How can I ensure that my python Code Registers the row1 2 or 3 under a different segment of Code?