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

no edit summary
imported>Jesstess
imported>Jesstess
No edit summary
Line 29:
 
[[File:Cbat_io.png|border|center]]
 
 
For this example CodingBat is going to run your function three times (one for each set of inputs). Some of the CodingBat problems will run your function more than three times, some less.
 
If you simply click "Go" without typing anything in the box, CodingbBat gives you an error on the right hand side of the screen:
 
 
[[File:Cbat_nocode.png|border|center]]
 
 
Let's add some code. Remember that you just need to write the body of the function, but you still need to indent. Here's a first try at the problem:
Anonymous user