@Monty/AustereAmpleXiaosaurus
Python3

No description

repl talk
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/python3
import sys
import random
import datetime
 
remarks=['Isn\'t it a nice day!', 
         'How are you today?',
         'I hear there was another shooting']
reply=['Really?', 'Oh wow!', 'Yeah...','Cool!']
 
if len(sys.argv) > 1:
    name = sys.argv[1]
else:
    name = input("Please tell me your name: ")
    if name == '': name = 'Monty'
     
hour = datetime.datetime.now().hour
 
if hour < 12:
    print ("Good morning", name)
elif hour < 18:
    print ("Good afternoon", name)
else:
    print ("Good evening", name)
 
input (random.choice(remarks))
print (random.choice(reply), "Oh well, see you later!\n")
Python 3.6.1 (default, Dec 2015, 13:05:11) [GCC 4.8.2] on linux