Loops/For with a specified step: Difference between revisions

added python
(Added Java and BASIC)
(added python)
Line 12:
}
System.out.println("who do we appreciate?");</lang>
=={{header|Python}}==
<lang python>for i in range(2, 9, 2):
print "%d," % i,
print "who do we appreciate?"</lang>
Output
<pre>2, 4, 6, 8, who do we appreciate?</pre>
=={{header|Ruby}}==
<lang ruby>2.step(8,2) {|n| print "#{n}, "}
Anonymous user