>>> abs(-3) 3 >>> help(abs) Help on built-in function abs in module builtins: abs(x, /) Return the absolute value of the argument. >>> sqrt(3) Traceback (most recent call last): File "", line 1, in NameError: name 'sqrt' is not defined >>> from math import sqrt >>> sqrt(3) 1.7320508075688772 >>> help(sqrt) Help on built-in function sqrt in module math: sqrt(...) sqrt(x) Return the square root of x. >>> import math >>> help(math) Help on module math: NAME math MODULE REFERENCE https://docs.python.org/3.5/library/math.html The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above. DESCRIPTION This module is always available. It provides access to the mathematical functions defined by the C standard. FUNCTIONS acos(...) acos(x) Return the arc cosine (measured in radians) of x. [...] trunc(...) trunc(x:Real) -> Integral Truncates x to the nearest Integral toward 0. Uses the __trunc__ magic method. DATA e = 2.718281828459045 inf = inf nan = nan pi = 3.141592653589793 FILE /Applications/Spyder.app/Contents/Resources/middPython/lib/python3.5/lib-dynload/math.so >>> from math import * >>> pi 3.141592653589793 >>> from turtle import * >>> forward(100) >>> left(90) >>> forward(100) >>> left(90) >>> forward(200) >>> right(45) >>> backward(30) >>> penup() >>> right(45) >>> forward(100) >>> done() >>> clear() >>> runfile('/Volumes/nfshome/schar/Desktop/cs150/turtle-examples.py', wdir='/Volumes/nfshome/schar/Desktop/cs150') >>> square(100) >>> square(200) >>> square(50) >>> for i in range(5): ... print("hello") ... hello hello hello hello hello >>> list(range(5)) [0, 1, 2, 3, 4] >>> iterative_square(120) >>> simple_star() >>> clear() >>> asterisk_star(100, 8) >>> asterisk_star(200, 5) >>> clear() >>> simple_spiral() >>> for i in range(5): ... print("hello", i) ... hello 0 hello 1 hello 2 hello 3 hello 4 >>> sum = 0 >>> for i in range(10): ... sum = sum + (i+1) ... >>> sum 55 >>> clear() >>> scribble(10) >>> clear() >>> walk(50, 10) >>> done() >>> runfile('/Volumes/nfshome/schar/Desktop/cs150/turtle-star.py', wdir='/Volumes/nfshome/schar/Desktop/cs150')