Update ex_0_beginner_runfile.py#12
Conversation
nathanielpolley
left a comment
There was a problem hiding this comment.
Beginner objectives satisfied.
Intermediate objectives pending.
Advanced objectives pending.
Total score: pending/3.5
There was a problem hiding this comment.
Excellently done. Everything works on your end.
Enjoy the poem!
Score: 0.5/0.5
There was a problem hiding this comment.
Very excellent start here with if/else cases handing user input validation. One more small change to make. If there is invalid input for any of your first three steps, the variables "cell_count", "cell_count2", and "number" are not defined, as they are outside of the scope of the "if" statements.
When they are called in the final conditional, where cell_count and cell_count2 are expected, the program exits with an error, as nothing exists yet to be compared (see image below).
Therefore, it is just a small juxtaposition change to make. My advice would be to combine all three cases into just one if statement at the beginning using "and" (so all cases must be true to proceed), and if all conditions are satisfied, do the final if statement and calculation inside. In the case that at least one condition is not satisfied, it will prompt your message to the user, and the program will abort gracefully with exit code 1 (no red-text errors).
So close..best of luck.
Score: pending/1
There was a problem hiding this comment.
Thank you for the changes. Simply indent the final if statement to be within the first one, and it will only run if the conditions are satisfied, also add an else statement on that outer if statement to handle any time .isdigit() is false.
Score: pending/1
There was a problem hiding this comment.
I duly appreciate your commitment to excellence with your commits. Everything runs how it should. I will award full points.
Score: 1/1
Updated Version2
nathanielpolley
left a comment
There was a problem hiding this comment.
Beginner objectives satisfied.
Intermediate objectives pending.
Advanced objectives pending.
Total score: pending/3.5
There was a problem hiding this comment.
Thank you for the changes. Simply indent the final if statement to be within the first one, and it will only run if the conditions are satisfied, also add an else statement on that outer if statement to handle any time .isdigit() is false.
Score: pending/1
Updated Version
Assignment_Advanced
nathanielpolley
left a comment
There was a problem hiding this comment.
Beginner objectives satisfied
Intermediate objectives satisfied
Advanced objectives pending
Total score: pending/3.5
There was a problem hiding this comment.
I duly appreciate your commitment to excellence with your commits. Everything runs how it should. I will award full points.
Score: 1/1
There was a problem hiding this comment.
Very good start here. Two more things to do. The program must also handle lowercase atcg input. An easy fix for this is just to convert all inputs by using the .upper() method on the first string that is read in.
Secondly, GC content is the (number of Gs plus the number of Cs) divided by the total number of As Ts Cs and Gs, then multiplied by 100. Again, simple arithmetic to add.
I look forward to seeing your next version.
Score: pending/2
Week1_Intermediate
week1_Assignment_Output
week1_beginner_assignment

Test commıt