Lauras' first commit and push#18
Conversation
nathanielpolley
left a comment
There was a problem hiding this comment.
Beginner objectives satisfied
Intermediate objectives pending
Advanced objectives pending
Final score: pending/3.5
There was a problem hiding this comment.
Very nice to meet you Laura..
Just remember, while Python might help you model viral infections, it won't protect you from catching the coding bug. And don't worry about forgetting the last time you were without a computer – soon enough, you'll be dreaming in code and waking up to debug your breakfast. Just be careful not to mix up your viral models with your computer viruses, or you might end up with a very confused immune system..
It seems as though your GitHub has been set up, connected to PyCharm, and Python is able to run on your computer, as "import this" provides the poem you have copied over.
I will award full points.
Score: 0.5/0.5
There was a problem hiding this comment.
Very excellent start here. However, there is still work to be done. First, you will want to make sure that your program can handle all cases for input. For instance, I typed in "agtctgatcga", and it came out with the response attached. What will you will need to do is use the .upper() method on all user string input so it will be able to calculate regardless of whatever case they use.
Secondly, the code still does the calculations even when the user input is invalid. In this case, you have a single if statement that you need pairing with an else statement that will then prompt the user if the text contains anything besides as, ts, cs, and gs. Do the calculation in the output in the if part of it. Then you will need to print to the user that the GC content is GC content as it is just a value printed out in this current version.
Very nice work here. I will revisit your changes for a regrade once you have completed them.
Score: pending/2
There was a problem hiding this comment.
Good work on calculating the cell growth rate upon correct user input. However, as we know, not all users are correct..and we need to make conditionals to handle any possible incorrect variables. For instance, the user must only put numerical characters (0-9) with no negatives or decimals (can't have cell count less than zero or 'half' of a cell). You can use the isdigit() method to validate, which will return true if the input string matches this criteria. Once that is correct, you need to convert the string type to an int so that you can compare the sizes of the numbers and do math on them. Then you will need to check if final is greater than initial.
Here would be my go around for it:
- Define time, initial, and final objects with user input (no checking valid input here)
- First (outer) if/else -> check if string input contains only numbers with .isdigit() (hint: use 'and' to tie together conditionals into one line). This will eliminate negatives as well, as the character "-" fails the isdigit() test. Terminate program if not true.
- Convert all user string inputs to int.
- Second (inner) if/else -> check for if final is greater than initial. Terminate program if not true.
- Perform your calculus at the very inside of these nested if/else statements.
Once again, a very nice start.
Score: pending/1
Week 0 beginners- sorry for delay