-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.py
More file actions
63 lines (48 loc) · 1.3 KB
/
index.py
File metadata and controls
63 lines (48 loc) · 1.3 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
55
56
57
58
59
60
# variable that stores all entered keywords into a list.
keywords = []
# allows the user to enter a keyword
def enter_keyword(keyword):
keyword_list = keywords
keyword_list.append(keyword)
print "Keyword List"
print keyword_list
print "Enter the definition:"
enter_defintion(raw_input('> '))
# variable that stores all entered defintions into a list.
definitions = []
# allows the user to enter the definition for the term.
def enter_defintion(definition):
definition_list = definitions
definition_list.append(definition)
print "Definition List"
print definition_list
print "Enter an example:"
enter_example(raw_input('> '))
# variable that stores all entered definitions into a list.
examples = []
# allows the user to enter an example for the term.
def enter_example(example):
example_list = examples
example_list.append(example)
print "Example List"
print example_list
start()
#def printing everything in order
# this starts the entry.
def start():
# enter a term?
print "Do you want to enter a term?"
choice = raw_input('> ')
if choice == 'yes':
print "Please enter your term:"
enter_keyword(raw_input('> '))
elif choice == 'no':
print "Keywords"
print keywords
print "Definitions"
print definitions
print "Examples"
print examples
else:
print "ok thank you anyway"
start()