IFB104 Lecture Notes - Lecture 2: Turtle Graphics, Scripting Language

218 views3 pages
8 Nov 2018
School
Course
Professor

Document Summary

Topic 2 - how to use pre-defined functions. In this unit we do this using python as a simple scripting language for teaching purposes. methods are special functions applicable to classes (values of certain types) and are called with the first argument preceding the function name using dot notation. Some functions do both of these actions (turtle"s "stamp" method draws an image and returns an identifier for the image) Some functions like the built-in "round" function allow some arguments to be optional. Some functions like the built-in "sorted" function allow us to specify which arguments we wish to provide by their name. More character string operations: we have seen that numeric operations such as + or * work with character strings, all of these operations return a new string, leaving the original one unchanged. Some other commonly used string operations are shown on the right.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents