O o 1 0 1 0 which will call the utegt00 function and

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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? eptrl.oo Type just t r l . o oand press enter. You should see now the definition utegt of the function. compare it to t r l . o o 1 0 1 0 – which will call the utegt(0,0) 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 – utegt(0,0) 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 utette" s r n " receives a string (we can recognize it by the " sign) while the tig) 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.

Ask a homework question - tutors are online