This preview shows page 1. Sign up to view the full content.
Unformatted text preview: urtle.goto" with the parameters – 100 and 100.
In the Python shell try to i p r u t e and then type
mottrl h l ( u t e g t )and press enter. What did you get?
Type just t r l . o oand press enter. You should see now the definition
of the function. compare it to t r l . o o 1 0 1 0 – which will call the
function and return the result of the running of the function.
Parameters (or arguments) are the functions' inputs. By typing
t r l . o o 1 0 1 0 –The turtle pen will move to an absolute position –
100 100 on the screen. You've learned in class about different types we
have in Python – string, int and float. A function may receive as input
parameters of different types. For example the function t r l . i l ( a
s r n " receives a string (we can recognize it by the " sign) while the
function u t e g t ( n , n ) receives two integers.
trl.ooitit You may play and change the different parameters, but at least for today, don't
change any ot...
View Full Document
This document was uploaded on 03/20/2014 for the course CMSC 67101 at Hebrew University of Jerusalem.
- Spring '14