Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> 
======================== RESTART: E:/Python/ps7 q5.py ========================
Enter first sentence hello my name is natalie
Enter second sentence I am in isd class now)
hello my name is natalie I am in isd class now)
>>> 
======================== RESTART: E:/Python/ps7 q5.py ========================
Enter first sentence 
Enter second sentence 
======================== RESTART: E:/Python/ps7 q5.py ========================
Enter first sentence lol
Enter second sentence pop
lol pop
lolpop
>>> 
======================== RESTART: E:/Python/ps7 q5.py ========================
Enter first sentence lool
Enter second sentence pop
lool pop
loolpop
['l', 'o', 'o', 'l', 'p', 'o', 'p']
>>> 
======================== RESTART: E:/Python/ps7 q5.py ========================
Enter first sentence lool
Enter second sentence pop
lool pop
loolpop
['l', 'o', 'o', 'l', 'p', 'o', 'p']
['l', 'l', 'o', 'o', 'o', 'p', 'p']
>>> 
======================== RESTART: E:/Python/ps7 q5.py ========================
Enter first sentence lool
Enter second sentence pop
lool pop
loolpop
['l', 'o', 'o', 'l', 'p', 'o', 'p']
['l', 'l', 'o', 'o', 'o', 'p', 'p']
7
>>> 
======================== RESTART: E:/Python/ps7 q5.py ========================
Enter first sentence i am chris
Enter second sentence i am programming stuff
i am chris i am programming stuff
i am chrisi am programming stuff
['i', 'am', 'chrisi', 'am', 'programming', 'stuff']
['am', 'am', 'chrisi', 'i', 'programming', 'stuff']
6
>>> 
======================== RESTART: E:/Python/ps7 q5.py ========================
Enter first sentence an apple is a fruit
Enter second sentence water is a drink
an apple is a fruit water is a drink
an apple is a fruitwater is a drink
['an', 'apple', 'is', 'a', 'fruitwater', 'is', 'a', 'drink']
['a', 'a', 'an', 'apple', 'drink', 'fruitwater', 'is', 'is']
8
Traceback (most recent call last):
  File "E:/Python/ps7 q5.py", line 18, in <module>
    for word in finalist:
NameError: name 'finalist' is not defined
>>> 
======================== RESTART: E:/Python/ps7 q5.py ========================
Enter first sentence an apple is a fruit
Enter second sentence water is a drink
an apple is a fruit water is a drink
an apple is a fruitwater is a drink
['an', 'apple', 'is', 'a', 'fruitwater', 'is', 'a', 'drink']
['a', 'a', 'an', 'apple', 'drink', 'fruitwater', 'is', 'is']
8
Traceback (most recent call last):
  File "E:/Python/ps7 q5.py", line 19, in <module>
    sentences[word]=finalist.count(word)
NameError: name 'finalist' is not defined
>>> 
======================== RESTART: E:/Python/ps7 q5.py ========================
Enter first sentence an apple is a fruit
Enter second sentence water is a drink
an apple is a fruit water is a drink
an apple is a fruitwater is a drink
['an', 'apple', 'is', 'a', 'fruitwater', 'is', 'a', 'drink']
['a', 'a', 'an', 'apple', 'drink', 'fruitwater', 'is', 'is']
8
{'is': 2, 'apple': 1, 'fruitwater': 1, 'drink': 1, 'a': 2, 'an': 1}
>>> 
