import random
IsTherePower = True
IsThereWater = True
Door = True

if IsTherePower and IsThereWater:
    print("Good to go, there is power and water")
else:
    print("You forgot to pay your bills or you didnt plug it in")

print("Select an option from the list:")
print("1, Display preconfigured programs")
print("2, A custom program")

print("time to enter your clothes and detergent")

UserChoice = int(input("Select options 1 or 2"))

PreConfig = 0
temperature = 30
duration = 300
spinSpeed = 1200
delay = 0 






if UserChoice == 1:
    print("User has selected option 1")
    print("1, A really really Quick wash")
    print("2, Cold wash")
    print("3, Hot wash")
    PreConfig = int(input("Select options 1 through to 3"))

    if PreConfig == 1: # 1 is a quic wash
        temperature = 30
        duration = 5
        spinSpeed = 10000000000000000
    
    if PreConfig == 2: #2 is cold wash
        temperature = -30
        duration = 500000
        spinSpeed = 1200
    
    if PreConfig == 3: #3 is a nuclear wash
        temperature = 10000
        duration = 300
        spinSpeed = 800

    if PreConfig < 1 or PreConfig > 3:
        print("Your number comprehension is as good as nathans")

if UserChoice == 2:
    print("User has selected option 2: A custom setting")
    temperature = int(input("Enter a temperature"))
    duration = int(input("Enter a duration"))
    spinSpeed = int(input("Enter a spin speed"))

if UserChoice < 1 or UserChoice > 2:
    print("Youre an idiot, you had two options")

delay = int(input("Please specify a delay, 0 for none"))


if delay > 0:
    print("Waiting the specified time..... " + delay)


if Door == True:
    print("Door is closed, moving on")
else:
    print("Close the door your letting my sun out")


print("The boiler has brought it up to temperature ")
currentTemperature = temperature 

while duration > 0:
    currentTemperature = currentTemperature - random.randint(0, 5)
    print("Washy washy")
    while currentTemperature < temperature:
        currentTemperature = currentTemperature + 1
    
    while currentTemperature > temperature:
        currentTemperature = currentTemperature - 1


    duration = duration - 1


Door = False
print("Door has unlocked")
print("Washing complete")

    