Conversation
|
Hi Anna. It is nice to meet you and I agree with you fully on your motivation. Not only does computer science open yourself to new opportunities, but it provides a new means of thinking through problems objectively in a world where too many things are guided by emotion alone. Just one suggestion, the "import this" line was supposed to produce a poem to be copied over to the submit file above the text output from your prompts. However, as everything shows that your PyCharm can run the code correctly, and you are connected to GitHub, I can give you the full points. Score: 0.5/0.5 |
nathanielpolley
left a comment
There was a problem hiding this comment.
Hi Anna. Everything is good about your intermediate assignment so far. The one thing you have left to add is the ability to "handle incorrect user input gracefully". For this, you will need to think through the cases that the user might type something in incorrectly and encapsulate an exception into an if/else statement which terminates the code if there is incorrect formatting. There are three main instances of incorrect user input here, and I would like you to think of what they are and implement the appropriate conditionals for them. Then, I will provide you with a final grade.
nathanielpolley
left a comment
There was a problem hiding this comment.
For your advanced assignment, everything runs as it should. However, I would like for you to refactor it again with The Zen of Python in mind: "Simple is better than complex". There is a native function for strings that "counts" how many occurrences of a character there are. This is done using vectorization, which is a lot nicer on the memory than iterating through the entire string, which can become demanding on the CPU if you are dealing with large datasets of millions of DNA reads. Implement this change while preserving the great work you have already done with the try/catch output you have created for something that is not a DNA sequence. I will give you full points then. Best of luck.
Nathaniel
|
only the comit cf85d2f is correct (i don't know why the other ones are like that....) |
nathanielpolley
left a comment
There was a problem hiding this comment.
Complete: assignment 0 intermediate
Pending: assignment 0 advanced
There was a problem hiding this comment.
Very excellent work here. My only recommendation would be to validate if the user entered a string that could be converted to an int as soon as it is read in. However, everything that I asked has been implemented taking into account the if/else statements that I wanted people to learn from this, so I will award you the full points.
Score: 1.5/1.5
There was a problem hiding this comment.
For this, instead of using a for loop, you can simply use the .count() string method to count the number of characters in a string. See below:
Then you can use the values from this to perform the necessary calculations after validating that the user only input an ATC or G.
There was a problem hiding this comment.
Very excellent implementing the correct changes to this.
Score: 2/2
nathanielpolley
left a comment
There was a problem hiding this comment.
Completed: assignment beginner 0, assignment intermediate 0, assignment advanced 0
Pending: None
Score: 4/4
There was a problem hiding this comment.
Very excellent implementing the correct changes to this.
Score: 2/2
nathanielpolley
left a comment
There was a problem hiding this comment.
Complete: assignment 0 beginner, assignment 0 intermediate, assignment 0 advanced
Total score: 4/4
There was a problem hiding this comment.
Obviously, everything works on both your GitHub and PyCharm, so I will mark this and all of the other assignment 0 objectives as complete.
Score: 0.5/0.5
nathanielpolley
left a comment
There was a problem hiding this comment.
Completed: assignment_0_beginner, assignment_0_intermediate, assignment_0_advanced, assignment_1_intermediate, assignment_2_advanced
There was a problem hiding this comment.
Brilliant mastery of all of the topics to date! Although I am very impressed with the detailed code for each possible amino acid, BioPython does offer the methods such as .translate( ) to be able to perform these automatically. Nonetheless, someone did have to code all of these methods in BioPython at the machine level. Are you sure you don't want to do this for a living?
Take care!
Score: 2/2
There was a problem hiding this comment.
Excellent handling of dictionaries, for/while loops, and break statements.
Score: 1.5/1.5
test