-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimmy.py
More file actions
54 lines (40 loc) · 1.03 KB
/
Copy pathTimmy.py
File metadata and controls
54 lines (40 loc) · 1.03 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
This is an attempt to write novel for NanoWriMo programmatically,
using Python: NaNoPyMo
Novels must be 50k words. NaNoWriMo is typically November, but hey.
---------------
I present, for your reading pleasure: Timmy.
'''
import datetime, random
title = 'Timmy'
author = 'Timmy'
year = datetime.date.today().year
punctuation = [
'.','?',';',',','!',':'
]
def TitlePage (title, author, year):
print (title)
print ('by ', author)
print ('Published ', str(year))
print (' ')
def intro ():
print ('Ahem. ')
def ending():
print('Timmy.')
def main():
TitlePage(title, author, year)
intro()
word = 'Timmy'
counter = 1
for i in range(50001):
counter += 1
if counter < 11 and (random.randint(counter, 10) > 8):
print (word + punctuation[random.randint(0, 5)], end = ' ')
else:
counter = 1
print (word, end=' ')
ending()
if __name__ == '__main__':
main()