Commit 5bb7eb8a authored by Jasmin Jutila's avatar Jasmin Jutila
Browse files

Delete main.py

parent 31c25718
import ReadingFields
import CreateReservation
import csv
try:
file = open('reservations.csv')
file.close()
except FileNotFoundError:
with open("reservations.csv", "a") as f:
read_file = csv.writer(f)
try:
file_2 = open('customers.csv')
file_2.close()
except FileNotFoundError:
with open("customers.csv", "a") as f:
read_file = csv.writer(f)
response = input("Do you want to add new reservation?\n")
while response not in {"Yes", "No"}:
response = input("Please answer Yes or No: \n")
while response == "Yes":
new_reservation = CreateReservation.new_reservation_datainput()
if CreateReservation.check_availability(new_reservation) is True:
CreateReservation.save_reservation(new_reservation)
print("Reservation SUCCESFULL.")
response = input("Do you want to add another new reservation?\n")
while response not in {"Yes", "No"}:
response = input("Please enter Yes or No: ")
else:
print("No availability. Reservation failed.")
response = input("Do you want to try a different date or time?\n")
while response not in {"Yes", "No"}:
response = input("Please enter yes or no: \n")
else:
print("Ok. Reservation system will close")
quit()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment