This preview shows page 1. Sign up to view the full content.
Unformatted text preview: )
#g otecne,laeamsae ot h etr ev esg
utewie"el ol"fn="ra" 0 nra")
Type the code into the IDLE, and run it using the F5 button.
Few, very important principles of computer programming are already shown in this
short program: a. Comments. Comments are used to clarify codes and are not interpreted by
Python. Comments in Python start with the hash character, # and extend to the
end of the physical line.
c. Import. We already mentioned Import, by importing the module Turtle we
may now use already written functions implemented by others
Functions. Functions are short independent codes that can be called a
few times without the need to retype the code. We can recognize a call to d. a function when we see the Parentheses - (). The module turtle has
several functions that belong to it. When calling t r l . o o 1 0 1 0 ,
we call the function "t...
View Full Document
This document was uploaded on 03/20/2014 for the course CMSC 67101 at Hebrew University of Jerusalem.
- Spring '14