Warm-up: loops

posted by: Ms. Martin 28 February 2011 No Comment

What does from turtle import * mean?

What is the purpose of a for loop?

Write code to print all numbers 0 – 9.

Write a function that takes in a parameter n and prints all numbers 0 – n (including n).

Write a function that takes in a parameter n and prints all odd numbers 1 – n (including n if odd).

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>