Code Library


Hotel Managment
System :
   
A Hotel managment System Program which performs a basic funtion like customer Data handling , billing , hotel menu , service and Food charge

print("  ----------------------------------------------------")
print("  |              Hotel MANAGMENT SYSTEM              |")
print("  ----------------------------------------------------")
print("  |                  1. Booking                      | ")
print("  |                  2. Check Record                 |  ")
print("  |                  3. Hotel Room Info              |")
print("  |                  4. hotel menu card              |")
enter=(input("                 Enter options (1/2/3/4):"))
if (enter=="1"):
    print("  ----------------------------------------------------")
    print("  |            New Customer Order Entry              |")
    name=(input("                    name :"))
    phone=(input("                phone no :"))
    address=(input("                 Address :"))
    checkin=(input("                Check in :"))
    checkout=(input("               Check Out :"))
    extra=(input("   Service & Food charge :"))
    print("  |---------------Select Room Type-------------------|")
    print("""       
  |                 1. Standard Non-AC               |
  |                 2. Standard AC                   |
  |                 3. 3-Bed Non-AC                  |
  |                 4. 3-Bed AC                      |""")
    room=(input("                      Enter Room type:"))
    if (room=="1"):
         r="standard non AC --- 4000 rupees"
    elif (room=="2"):
         r="standard AC --- 4600 rupees"
    elif (room=="3"):
         r="3-bed NOn-AC --- 5000 rupees"
    elif (room=="4"):
         r="3-bed AC --- 6000 rupees"
    else:
         print("     enter correct room type ")
    print("  |--------------booking succesfully-----------------|")
    print("      ------------------------------")
    print("      |          INVOICE           |")
    print("      |   ----------------------   |")
    print("      |        Name :",name)
    print("      |    Phone No :",phone)
    print("      |     Address :",address)
    print("      |    Check In :",checkin)
    print("      |   Check Out :",checkout)
    print("      |   ------Room Type-------   |")
    print("      |",r)
    print("      |----------------------------|")
    with open("record.py","a")as file:
            file.write("\n")
            file.write("def ")
            file.write(name)
            file.write("():")
            file.write("\n   print('Name : ")
            file.write(name)
            file.write("')")
            file.write("\n   print('Phone No : ")
            file.write(phone)
            file.write("')")
            file.write("\n   print('Address : ")
            file.write(address)
            file.write("')")
            file.write("\n   print('Check In : ")
            file.write(checkin)
            file.write("')")
            file.write("\n   print('Check Out : ")
            file.write(checkout)
            file.write("')")
            file.write("\n   print('------------------ ")
            file.write("')")
            file.write("\n   print('Room type : ")
            file.write(r)
            file.write("')")
            file.write("\n   print('service & Food charge : ")
            file.write(extra)
            file.write("')")
    exit=(input("       Press Anykey for home :"))
    if (exit=="0"):
        import hotelmanagment
    else:
        import hotelmanagment
elif (enter=="2"):
    print("  |--------------------Check Record------------------|")
    print("  |                  1.Customer list                 |")
    print("  |                  2.Search Record                 |")
    search=(input("               enter :"))
    if (search=="1"):
     import record
     print("  |------------------Customer list-------------------|")
     file1_list = dir(record)
     print("       customer list in records:")
     for item in file1_list:
          if callable(getattr(record, item)):
               print(item)
     print("  |------------------Check record--------------------|")
     function_name = input("                 Enter the name: ")
     print("  |--------------------------------------------------|")
     try:
         module = __import__("record")
         function = getattr(module, function_name)
         function()
     except AttributeError:
         print("booking not found in the records.") 
     exit=(input("       Press Anykey for home :"))
     if (exit=="0"):
        import hotelmanagment
     else:
        import hotelmanagment
    elif (search=="2"):
     print("  |------------------Check record--------------------|")
     function_name = input("               Enter the name: ")
     print("  |--------------------------------------------------|")
     try:
         module = __import__("record")
         function = getattr(module, function_name)
         function()
         exit=(input("       Press Anykey for home :"))
         if (exit=="0"):
             import hotelmanagment
         else:
             import hotelmanagment
     except AttributeError:
         print("booking not found in the records.")
         exit=(input("       Press Anykey for home :"))
    else:
         print("enter 1 or 2 for action")
         exit=(input("       Press Anykey for home :"))
         if (exit=="0"):
             import hotelmanagment
         else:
             import hotelmanagment
elif(enter=="3"):
    print("|-------------------- HOTEL ROOMS INFO -----------------------|")
    print("---------------------------------------------------------------")
    print("|                     STANDARD NON-AC                         |")
    print("---------------------------------------------------------------")
    print("Room includes: 1 Double Bed, Television, Telephone,")
    print("an attached washroom with hot/cold water. ,")
    print("---------------------------------------------------------------")
    print("|                        STANDARD AC                          |")
    print("---------------------------------------------------------------")
    print("Room includes: 1 Double Bed, Television, Telephone,")
    print("Double-Door , 2 sofa, Balcony and wifi")
    print("an attached washroom with hot/cold water + Window/Split AC.")
    print("---------------------------------------------------------------")
    print("|                        3-Bed NON-AC                         |")
    print("---------------------------------------------------------------")
    print("Room includes: 1 Double Bed + 1 Single Bed, Television,")
    print("Telephone, 2 sofa, wifi , balcony with 2 chair")
    print("attached washroom with hot/cold water.")
    print("---------------------------------------------------------------")
    print("|                          3-Bed AC                           |")
    print("---------------------------------------------------------------")
    print("Room includes: 1 Double Bed + 1 Single Bed, Television,")
    print("Telephone, 2 sofa , Room service , wifi , balcony with 2 chairs ")
    print("attached washroom with hot/cold water + Window/Split AC.")
    exit=(input("       Press Anykey for home :"))
    if (exit=="0"):
        import hotelmanagment
    else:
        import hotelmanagment
elif(enter=="4"):
     print("|-----------------------------------------------------------------------|")
     print("                            Menu Card")
     print("|-----------------------------------------------------------------------|")
     print(" BEVARAGES                              26 Dal Fry................ 140.00")
     print("----------------------------------      27 Dal Makhani............ 150.00")
     print(" 1  Regular Tea............. 20.00      28 Dal Tadka.............. 150.00")
     print(" 2  Masala Tea.............. 25.00")
     print(" 3  Coffee.................. 25.00      ROTI")
     print(" 4  Cold Drink.............. 25.00     ----------------------------------")
     print(" 5  Bread Butter............ 30.00      29 Plain Roti.............. 15.00")
     print(" 6  Bread Jam............... 30.00      30 Butter Roti............. 15.00")
     print(" 7  Veg. Sandwich........... 50.00      31 Tandoori Roti........... 20.00")
     print(" 8  Veg. Toast Sandwich..... 50.00      32 Butter Naan............. 20.00")
     print(" 9  Cheese Toast Sandwich... 70.00")
     print(" 10 Grilled Sandwich........ 70.00      RICE") 
     print("                                       ----------------------------------")
     print(" SOUPS                                  33 Plain Rice.............. 90.00")
     print("----------------------------------      34 Jeera Rice.............. 90.00")
     print(" 11 Tomato Soup............ 110.00      35 Veg Pulao.............. 110.00")
     print(" 12 Hot & Sour............. 110.00      36 Peas Pulao............. 110.00")
     print(" 13 Veg. Noodle Soup....... 110.00")
     print(" 14 Sweet Corn............. 110.00      SOUTH INDIAN")
     print(" 15 Veg. Munchow........... 110.00     ----------------------------------")
     print("                                        37 Plain Dosa............. 100.00")
     print(" MAIN COURSE                            38 Onion Dosa............. 110.00")
     print("----------------------------------      39 Masala Dosa............ 130.00")
     print(" 16 Shahi Paneer........... 110.00      40 Paneer Dosa............ 130.00")
     print(" 17 Kadai Paneer........... 110.00      41 Rice Idli.............. 130.00")
     print(" 18 Handi Paneer........... 120.00      42 Sambhar Vada........... 140.00")
     print(" 19 Palak Paneer........... 120.00")
     print(" 20 Chilli Paneer.......... 140.00      ICE CREAM")
     print(" 21 Matar Mushroom......... 140.00     ----------------------------------")
     print(" 22 Mix Veg................ 140.00      43 Vanilla................. 60.00")
     print(" 23 Jeera Aloo............. 140.00      44 Strawberry.............. 60.00")
     print(" 24 Malai Kofta............ 140.00      45 Pineapple............... 60.00")
     print(" 25 Aloo Matar............. 140.00      46 Butter Scotch........... 60.00")
     exit=(input("       Press Anykey for home :"))
     if (exit=="0"):
        import hotelmanagment
     else:
        import hotelmanagment
else:
    print("""          Enter 1 or 2 if you want to add booking
           or check records""")
    exit=(input("       Press Anykey for home :"))
    if (exit=="0"):
        import hotelmanagment
    else:
        import hotelmanagment
 ----------------------------------------------------
  |              Hotel MANAGMENT SYSTEM              |
  ----------------------------------------------------
  |                  1. Booking                      | 
  |                  2. Check Record                 |  
  |                  3. Hotel Room Info              |
  |                  4. hotel menu card              |
                 Enter options (1/2/3/4):1
  ----------------------------------------------------
  |            New Customer Order Entry              |
                    name :sam
                phone no :8675664445
                 Address :newyork
                Check in :7 jan 2024
               Check Out :9 jan 2024
   Service & Food charge :$ 2900 
  |---------------Select Room Type-------------------|

  |                 1. Standard Non-AC               |
  |                 2. Standard AC                   |
  |                 3. 3-Bed Non-AC                  |
  |                 4. 3-Bed AC                      |
                      Enter Room type:2
  |--------------booking succesfully-----------------|
      ------------------------------
      |          INVOICE           |
      |   ----------------------   |
      |        Name : sam
      |    Phone No : 8675664445
      |     Address : newyork
      |    Check In : 7 jan 2024
      |   Check Out : 9 jan 2024
      |   ------Room Type-------   |
      | standard AC --- 4600 rupees
      |----------------------------|
       Press Anykey for home :