Skip to content

Conversation

@NickShermeister
Copy link

I did some edits for miniproject 5!
I also commented everything this time.

Copy link

@matthewruehle matthewruehle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small but useful changes to documentation and structure, quite in line with the goals of MP5. A few things probably ought to be changed as well, regarding extra/commented-out code, but all in all solid.

import random

def dict_creation_one(script, things = dict()):
'''Create the base dictionary for ONE word; only to be called if there is no dicts1.p already.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate the new header comments and file documentation - the program itself is cleaner and more follow-able as a result.

if y.lower() == 'y':
max_seasons = input("How many seasons do you want?: ")
remake = True
# print(not my_file.is_file()) #For testing purposes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For cleanliness/best practices, removing commented-out code and print-statement-debugging artifacts would be a good idea.

oneworddict = pickle.load( open( "dict1.p", "rb"))
twoworddict = pickle.load( open("dict2.p", "rb"))
allwords = pickle.load( open("allwords.p", "rb"))
blah2 = markov_chain_two(twoworddict, oneworddict, allwords) #create the markov chain

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not digging the variable choice, but the comments do help clarify what the code's doing in this section and all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants