def make_flight():
    flight = Flight(
        "SN066",
        Aircraft("G-EUP", "Airbus A319", num_rows=22, num_seats_per_row=6))
    # pp(f1._seating)
    flight.allocate_seat("02A", "Wayne Widdison")
    flight.allocate_seat("12B", "Rasmus Lerdorf")
    flight.allocate_seat("15F", "Bjare Larsen")
    flight.allocate_seat("03A", "Yakob Smirnoff")
    flight.allocate_seat("16F", "Yukihiro Matsumoto")
    return flight
Beispiel #2
0
def make_flight():
    f1ight = Flight("SN067", Aircraft("G-EUP", "Airbus A319", num_rows=22,
                                  num_seats_per_row=6))

    # pp(f1._seating)

    f1ight.allocate_seat("02A", "Guido Van Rossum")
    f1ight.allocate_seat("12B", "rasmus Lefdorf")
    f1ight.allocate_seat("15F", "Bjare Stroustrup")
    f1ight.allocate_seat("03A", "Yudihiro Matsumoto")
    return f1ight
Beispiel #3
0
def make_flight():
    flight = Flight(
        "SN066",
        Aircraft("G-EUP", "Airbus A319", num_rows=22, num_seats_per_row=6))

    flight.allocate_seat('11C', "Guido Van Rossum")
    flight.allocate_seat('11F', "Jack Sprat")
    flight.allocate_seat('02A', "Jack Sprat Jr.")

    pp(flight._seating)
    return flight
Beispiel #4
0
def make_flight():
    """
    Generate a dummy flight for us
    :return: Dummy flight information
    """
    flight = Flight("SN066",
                    Aircraft("G-EUP", "CRJ", num_rows=20, num_seats_row=4))
    flight.allocate_seat("2A", "Jane Doe")
    flight.allocate_seat("4D", "John Smith")
    flight.allocate_seat("20C", "Larry Wall")
    return flight
def make_flight():
    a1 = Aircraft("blah", "airbus", 22, 6)
    flight = Flight("SN066", a1)
    print(flight, type(flight))
    print(flight.number())
    flight.alllocate_seat("1C", "John")
    flight.alllocate_seat("11C", "Cindy")
    return flight
Beispiel #6
0
def my_code():
    """
    Test function
    :return: 
    """

    flight_1 = make_flight()
    flight_1 = Flight(
        "SN066",
        Aircraft("G-EUP", "Airbus A319", num_rows=22, num_seats_per_row=6))

    pp(flight_1._seating)
    # Count the Nones
    #capacity = flight_1._aircraft.seating_plan()
    print("Available seats", flight_1.num_available_seats())
    flight_1.make_bording_class(console_card_printer)
    # don't include the function i.e., the paranthesis.

    return flight_1
def make_flight():
    """

    :return:
    """
    flight = Flight("SN066", Aircraft("G-EUP", "Airbus A319", num_rows= 22, num_seats_per_row= 6))

    # print(a1.registration(), a1.model()))
    # print(flight.number(), flight.airline())
    # f2 = Flight("SN013")
    # print(f2.number(), f2.airline())
    # # could use: Flight.number(f) horrible notation
    # a1 = Aircraft("G-EUP", "Airbus A319", num_rows= 22, num_seats_per_row= 6)
    # print(a1.registration(), a1.model())
    # pp(f1._seating)
    flight.allocate_seat("02A", "Guido Van Roussum")
    flight.allocate_seat("02F", "Van Roussum")
    flight.allocate_seat("02B", "Van")
    # flight.allocate_seat("02A", "Guido Roussum")
    return flight
Beispiel #8
0
def make_flight():
    numrows = 22
    seatsper = 6
    flight = Flight("SN066",
                Aircraft("G-EUP",
                         "Airbus A319",
                         numrows,
                         seatsper))
    # pp(f1._seating)
    flight.allocates("12E", "Guide Van Rosen")
    flight.allocates("12B", "Sam Shafter")
    flight.allocates("20E", "Jimmy Hancock")
    flight.allocates("05A", "Del Ray Bell")
    flight.allocates("12C", "Brent Timothy")
    return flight
Beispiel #9
0
# in the console
from airtravel import Flight

f = Flight("SN060")
f.number()
f._number

from airtravel import *

a = Aircraft("G-EUPT", "Airbus A319", num_rows=22, num_seats_per_row=6)
a.registration()
a.model()
a.seating_plan()

from airtravel import *

f = Flight("BA758",
           Aircraft("G-EUPT", "Airbus A319", num_rows=22, num_seats_per_row=6))
f.aircraft_model()

from airtravel import *

f = Flight("BA758",
           Aircraft("G-EUPT", "Airbus A319", num_rows=22, num_seats_per_row=6))
f._seating
from pprint import pprint as pp

pp(f._seating)

from airtravel import *
from pprint import pprint as pp
Beispiel #10
0
from airtravel import Flight, Aircraft

f = Flight("KO1234")
a = Aircraft("G-EUPT", "Airbus A333", 22, 6)

print(a.registration())
print(a.seating_plan())
def make_flight():
    """

    :return:
    """

    flight = Flight(
        "SN066",
        Aircraft("G-EUP", "Airbus A319", num_rows=22, num_seats_per_row=6))

    flight.allocate_seat("02A", "Guido Van Rossum")
    flight.allocate_seat("12B", "Rasmus Lerdorf")
    flight.allocate_seat("15F", "Bjanre Stroustrup")
    flight.allocate_seat("03A", "Larry Wall")
    flight.allocate_seat("16F", "Yukihiro Mastsumoto")

    return flight
Beispiel #12
0
def make_flight():
    """
    Test function
    :return: Nothing
    """
    flight = Flight(
        "SN066",
        Aircraft("G-EUP", "Airbus A319", num_rows=22, num_seats_per_row=6))
    # pp(f1._seating)
    flight.allocate_seat("02A", "Guido Van Rossum")
    flight.allocate_seat("12B", "Rasums Lerdorf")
    flight.allocate_seat("15F", "Bjare Stroustrup")
    flight.allocate_seat("03A", "Larry Wall")
    flight.allocate_seat("16F", "Yukihiro Matsumoto")
    return flight
Beispiel #13
0
def make_flight():
    flight = Flight(
        "SN066",
        Aircraft("G-EUP", "Airbus A319", num_rows=22, num_seats_per_row=6))
    pp(flight._seating)
    flight.allocate_seat("1A", "Guido Van Rossum")  # Python creator
    flight.allocate_seat("6C", "Rasmus Lerdorf")  # php author
    flight.allocate_seat("05D", "Bjare")  # C++
    flight.allocate_seat("6F", "Larry")  # Created Perl
    flight.allocate_seat("20E", "Yukihiro")  # Wrote Ruby
    return flight
def main():
    """
    Test function
    :return:
    """
    f1 = Flight(
        "SN066",
        Aircraft("G-EUP", "Airbus A319", num_rows=22, num_seats_per_row=6))
    pp(f1._seating)
    f1.allocate_seat("02A", "Guido Van Rossum")  # python
    f1.allocate_seat("12B", "Rasmus Lerdorf")  # PHP
    f1.allocate_seat("15F", "Bjare Straoustrup")  # C++
    f1.allocate_seat("03A", "Larry Wall")  # perl
    f1.allocate_seat("16F", "Yukihiro Matsumoto")  # ruby
    pp(f1._seating)
Beispiel #15
0
def make_flight():
    flight = Flight(
        "SN066",
        Aircraft("G-EUP", "Airbus A319", num_rows=22, num_seats_per_row=6))
    # pp(flight._seating)
    flight.allocate_seat("02A", "Guido Van Rossum")  # python
    flight.allocate_seat("22B", "Rasmus Lerdorf")  # php
    flight.allocate_seat("15F", "Bjare Stroustrup")  # C++
    flight.allocate_seat("03A", "Larry Wall")  #perl
    flight.allocate_seat("16F", "Yukihiro Matsumoto")  #ruby
    return flight
Beispiel #16
0
from airtravel import Flight, Aircraft
from pprint import pprint as pp

aa = Aircraft("AD", "AIRBUS", 40, 8)

f = Flight("QA780", aa)

pp(f._seating)

f.allocate_seat('3A', 'Prem')
f.allocate_seat('3B', 'Priya')

pp(f._seating)

f.allocate_seat('3B', 'Alia')
Beispiel #17
0
from airtravel import Flight
from airtravel import Aircraft

possible_flights = {'joke':, 'AP564', '23' , 'casa']
for flight in possible_flights:
    try:
        result = Flight(flight)
        print(result)
    except ValueError as Erro:
        print(Erro)

aircraft = Aircraft('AZUL','487', 21, 7)
model = aircraft.model()
registration = aircraft.registration()
seats = aircraft.seating_plan()
print(seats, model, registration)