What is Nostr?
Ape Mithrandir
npub16ds…h6vy
2024-09-12 13:47:02

Ape Mithrandir on Nostr: ```python import datetime as dt def greet_based_on_time(): now = ...

```python
import datetime as dt

def greet_based_on_time():
now = dt.datetime.now().time()
morning_threshold = dt.time(10, 0)
evening_threshold = dt.time(20, 0)

if now < morning_threshold:
print('GM')
elif now >= evening_threshold:
print('GN')
else:
raise Exception('Invalid time for greeting')

try:
greet_based_on_time()
except Exception as e:
print(e)
```
Author Public Key
npub16dsu2ghu9yd363utyw7dejqc8rgx5ps7r4hxddrvx2x64dh73p7qqkh6vy