# A traffic advisor: # Let's drive to beautiful New Jersey! Interact with native New Jersians # and experience a unique culture. # Driving from Long Island to NJ could be tricky depending on the time of # day and other factors. Rush hours in the NY area usually lasts from # 6am to 9am and from 4pm to 7pm M-F. During rush hours we stay home. # Three routes: George Washington Bridge, Verizonal Narrows Bridge, and # the Lincoln Tunnel. On weekends (saturday and sunday) before 11am, take # the Lincoln Tunnel. On Monday-Thursdays, during non-rush hours, take # GW bridge. On Friday non-rush hours and Saturdays, Sundays after 10am, # take the Verizonal Bridge, otherwise, cancel the trip to avoid traffic. # input consists of a number between 0-6 indicating Sunday-Saturday, and an # integer 0-23 indicating the hour of the day. day,hour = input("Enter day, hour:") if day==6 or day==0: # weekend if hour<11: route = "Take the Lincoln Tunnel" else: route = "Take the Verizonal Bridge" else: # weekday if (hour>=6 and hour<=9) or (hour>=16 and hour<=19): # rush hour route = "Stay home" else: #non-rush hour if day<5: #monday-thursday route = "Take the GW bridge" else: # friday route = "Take the Verizonal Bridge" # rush hour decision # weekend decision print route