Boston Python Workshop 6/Friday/CodingBat Using Codingbat: Difference between revisions

Content added Content deleted
imported>Jesstess
imported>Jesstess
Line 9: Line 9:
For each CodingBat question, you will write a function. CodingBat will run your function with a few different inputs, and will compare the output of the function you wrote to what it knows is the correct answer. If all the outputs are correct for all the inputs, you've written the function correctly!
For each CodingBat question, you will write a function. CodingBat will run your function with a few different inputs, and will compare the output of the function you wrote to what it knows is the correct answer. If all the outputs are correct for all the inputs, you've written the function correctly!


We like CodingBat because it gives immediate feedback.
We like CodingBat because it gives you immediate feedback on how close your function is to being correct.


Let's walk through an example. In this case I'll use [http://codingbat.com/prob/p216579 the sumTwoNumbers] exercise.
Let's walk through an example. In this case I'll use [http://codingbat.com/prob/p216579 the sumTwoNumbers] exercise.