Q:

Why does my program call out a different code?

So I'm working on a homework for my python class (This is my first huge homework, and boy, it's so tough.)
So if I run the code below(It's just one part of my assignment, I didn't copy paste the whole code from my assignment here to make it easier for you guys, I also tried to shorten it as much as possible xD). If I type my name and then type 10 for the time(This only happens when I write 10 for time and L for destination) and L for the destination the code works as intended and prints out the ticket and replaces one 0 into a 1 in the list. But when I type Yes when it asks me if I want to continue running the program, it calls out the else: code from way below and I cant figure out why it does that, so I was hoping that you guys can help me out xD
THanks in advance and I apologize if I wasnt able to word this question properly
Edit: I figured that I should give you guys an idea as to what this assignment is about. So I'm to create a program that will assign seats for people in a ferry depending on the time and destination that they choose. Just like in the code below, if the user types 10 for the time and L for the destination they will be assigned to Ferry number 1 and one of the zeroes in the list will turn into one to indicate that the seat is now taken, and it will keep doing that until it gets full.
Edit: I'm an absolute beginner in python so forgive me if my code looks hideous haha
economy_class1 = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
economy_class2 = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

name = input("Please enter your name: ")
time = int(input("Enter hour of time of departure: "))
destination = input("Penang or Langkawi? Type P or L: ")
if time == 10 and destination == 'L':
    economy_class1 [0] = 1
    economy_class1 [2] = 1
    economy_class1 [4] = 1
    economy_class1 [5] = 1
    economy_class1 [37] = 1
    economy_class1 [38] = 1
    economy_class1 [39] = 1

    for i, seat in enumerate(economy_class1):
        if seat == 0:
            economy_class1[i] = 1

            print("Here is your ticket")
            print(name +", " "E" + str(i), "Economy Class," "To Langkawi," "From Penang")
            print("Please enjoy your trip!")
            print("********************************")
            cont = input("Type Yes to continue using the program, Type No to quit the program")
            if cont == 'No':
                menu_guard = False
                exit_program()
                back_to_menu = False
                submenu_guard = False
                guard = False
            elif cont == 'Yes':

                guard = True
            break
    else:
        print("All seats are taken")

if time == 11 and destination == 'P':
    economy_class2 [0] = 1
    economy_class2 [1] = 1
    economy_class2 [2] = 1
    economy_class2 [3] = 1
    economy_class2 [4] = 1
    economy_class2 [5] = 1
    economy_class2 [36] = 1
    economy_class2 [37] = 1
    economy_class2 [38] = 1
    economy_class2 [39] = 1

    for i, seat in enumerate(economy_class2):
        if seat == 0:
            economy_class2[i] = 1

            print("Here is your ticket")
            print(name +", " "E" + str(i), "Economy Class," "To Penang," "From Langkawi")
            print("Please enjoy your trip!")
            print("********************************")
            cont = input("Type Yes to continue using the program, Type No to quit the program")
            if cont == 'No':
                menu_guard = False
                exit_program()
                back_to_menu = False
                submenu_guard = False
                guard = False
            elif cont == 'Yes':

                guard = True
            break

    else:
        print("All seats are taken")

else:

    choice = input("No Available Ferry at this hour, type Yes to try again and No to quit the porgram: ")

A:

I think its just a normal if else error.
Suppose you enter name = xyz , time=10 and destination=L. It gives you the expected output by assigning the seat. Then when it asks "Type Yes to continue using the program, Type No to quit the program" and lets say you type "Yes". It makes the value of the variable "guard"=True and breaks from the for loop. Then after this ' if time == 10 and destination == 'L' ' block there is another block of 'if time == 11 and destination == 'P': '. There are two continuous if statements. Here it checks the value of time again and of course time is not equal to 11 so it moves to the else part. 
Try making the second if as elif.
elif time == 11 and destination == 'P':

