Skip to content

Commit 1b519fc

Browse files
committed
update read me file
1 parent f95a46d commit 1b519fc

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed
File renamed without changes.

Programs/DelivaryTime.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
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+

0 commit comments

Comments
 (0)