Answered step by step
Verified Expert Solution
Question
1 Approved Answer
LateNightNoms.py SubmitRun Grades Reset 1 hour = 3 Console output will be displayed here 2 minute = 45 4 #You may modify the lines of
LateNightNoms.py SubmitRun Grades Reset 1 hour = 3 Console output will be displayed here 2 minute = 45 4 #You may modify the lines of code above, but don't move them! 5 #when you submit your code, we'll change these lines to 6 #assign different values to the variables. 7 8 #Around Georgia Tech, there are plenty of places to get a 9 #late night bite to eat. However, they have different hours, 10 #so when choosing where to go, you have to think about who's 11 #still open ! 12 # 13 #Imagine you're choosing between the following restaurants: 14 # 15 # -Barrelhouse: closes at 11:00PM 16 # -Taco Bell: Closes at 2:00AM 17 # -Cookout: Closes at 3:00AM 18 # -Waffle House: Never closes. Ever. 19 # 20 #Assume that this list is also a priority list: if Barrelhouse 21 #1s open, you choose Barrelhouse. If not, you choose Taco Bell 22 #if it's open. If not, you choose Cookout if it's open. If 23 #not, you choose Waffle House. 24 # 25 #However, there are two wrinkles: 26 # 27 # -We're using 12-hour time 28 # -hour will always represent a time from 10PM to 5AM 29 # 30 #That means that if hour is 10 or 11, it's PM; if hour is 31 #12, 1, 2, 3, 4, or 5, it's AM. This will make your reasoning 32 #a little more complex. You may assume that all four 33 #restaurants open later than 6AM, though, so you don't have 34 #to worry about opening time, just closing time 35 # 36 #Add some code below that will print what restaurant you'll 37 #go to based on the current values of hour and minute. 38 39 hour str (hour) 40 minute str(minute) 41 time-(str(hour)+":"+str(minute)) 42 43 44 #Add your code here! 45 if time-1 : 46 47 elif time -2: 48 print("Taco Bell") 49 elif time 3: 50 print("Cookout" 51 elif time-time: print( "Barrelhouse") 52 print("Waffle House") 53
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started