4.6. Summary¶
In this chapter, you learned how to use the Python REPL, also called the Python prompt, to solve problems. You learned how to do arithmetic, powers and logarithms, trigonometry and save values to variables. Operations on strings were introduced including concatenation and comparison. In the last section of the chapter, Python’s print()
function was introduced.
4.6.1. Key Terms and Concepts¶
REPL
Python REPL
Python Prompt
prompt
Python Interpreter
interpreter
operator
mathematical operator
import
module
Python Standard Library
Standard Library
syntax
functions
command line
error
variable
assignment operator
comparison operator
concatenate
equivalent
index
indexing
slicing
4.6.2. Summary of Python Functions and Commands¶
Below is a summary of the functions and operators used in this chapter:
4.6.2.1. Arithmetic¶
Arithmetic Operator |
Description |
---|---|
|
addition |
|
subtraction |
|
multiplication |
|
division |
|
exponents |
|
answer in memory |
4.6.2.2. Trigonometry¶
Trig Function |
Description |
---|---|
|
|
|
sine of angle in radians |
|
cosine of angle in radians |
|
tangent of angle in radians |
|
\(\pi\) |
|
convert radians to degrees |
|
convert degrees to radians |
|
inverse sine |
|
inverse cosine |
|
inverse tangent |
4.6.2.3. Logarithms and Exponents¶
Logarithms and Exponent Function |
Description |
---|---|
|
|
|
log base e, natural log |
|
log base 10 |
|
\(e^{power}\) |
|
the math constant \(e\) |
|
x raised to the y power |
|
square root |
4.6.2.4. Statistics¶
Statistics Function |
Description |
---|---|
|
|
|
mean (average) |
|
median (middle value) |
|
mode (most often) |
|
standard deviation of a sample |
|
standard deviation of a population |