File tree Expand file tree Collapse file tree 3 files changed +50
-1
lines changed Expand file tree Collapse file tree 3 files changed +50
-1
lines changed File renamed without changes.
Original file line number Diff line number Diff line change
1
+ This problem was descrived by []
2
+
3
+ from datetime import datetime , timedelta
4
+
5
+ # Get the current time without microseconds
6
+ current_date = datetime .now ().strftime ('%Y-%m-%d' )
7
+ next_day_date = datetime .now ().date () + timedelta (days = 1 )
8
+
9
+
10
+
11
+
12
+ def deliveryTimer (orderTime ):
13
+ if orderTime < 6 :
14
+ print ("Delivary time is : " + current_date )
15
+
16
+ retry = input ("Do you want to retry? (y/q): " ).lower ()
17
+ if retry != "y" :
18
+ quit ()
19
+ else :
20
+ print ("Delivary date is : " + str (next_day_date ))
21
+
22
+ retry = input ("Do you want to retry? (y/q): " ).lower ()
23
+ if retry != "y" :
24
+ quit ()
25
+
26
+
27
+
28
+
29
+ while True :
30
+ orderTime = input ("Enter order time : " )
31
+ if orderTime .isnumeric ():
32
+ orderTime = int (orderTime )
33
+ deliveryTimer (orderTime )
34
+ else :
35
+ print ("Not a valid input" )
36
+ retry = input ("Do you want to retry? (y/q): " ).lower ()
37
+ if retry != "y" :
38
+ break
39
+
Original file line number Diff line number Diff line change 1
- # 100-Python-Programs-
1
+ # 100-Python-Programs
2
+
3
+ Program List :
4
+ 1. Add two number
5
+ 2. Calculate square root
6
+ 3. Check Leap year
7
+ 4. Check prime number
8
+ 5. Quize game
9
+ 6. Swap two variable
10
+ 7. Two sum [ Leet Code ]
11
+
You can’t perform that action at this time.
0 commit comments