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

no edit summary
imported>Jesstess
No edit summary
imported>Jesstess
No edit summary
Line 37:
 
 
Let's add some code. RememberThe that'''function yousignature''' justhas needalready tobeen written for you. You'll write the bodyrest of the function, but-- you still needremember to indent. Here's aeverything first try atinside the problem:function!
 
 
[[File:Cbat_wrong.png|border|center]]
 
 
Hmm. I've got one correct and two wrong. Maybe instead of <code>return</code> I should use <code>print</code>?
 
 
[[File:Cbat_print.png|border|center]]
 
 
That's not it. CodingBat problems always want you to use <code>return</code> in your functions. Oh! I see - I typed in <code>first</code> twice, when instead I should have used <code>second</code>:
 
 
[[File:Cbat_correct.png|border|center]]
 
 
Great!
Anonymous user