CS 110 Lecture Notes - Lecture 3: Special Functions
Document Summary
Computer science lesson 3 cs110classwork@cs. binghamton. edu send classwork to this email. Heredoc syntax string = """ here is doc """ Allows you to make a string using multiple lines. Also works with triple double quotes ( hello there world ) Two principles of programming: dry code (do not repeat yourself) If you"ve written code once, do not write it again: write for reuse. Write so that it is easy to reuse. Anything that is changeable should be in a variable, easy to reuse. The reason that classes exist are because of these principles. You don"t need to import any functions in standard library, but any other functions must have their library imported. Example: math must be imported to use a function like sqrt(). To import, you have to put import [insert library] at the top of the code. Turtle is a learning library, good for learning basic concepts and displaying guis.