Glossary of Code#

Index#

A| B| C| F| H| I| L| M| P| R| S| T| #

A#

abs(...)#

Absolute value function: Returns the absolute value of the given input.

Learn more in Chapter 3  |  Back to Top

Arithmetic Operators#

  • + : Addition

  • - : Subtraction

  • * : Multiplication

  • / : Division (float)

  • // : Floor Division

  • % : Modulus (remainder)

  • ** : Exponentiation

Learn more in Chapter 3  |  Back to Top

Assignment Operator#

  • = : Assigns an object to a variable

Learn more in Chapter 3  |  Back to Top

B#

bool()#

Learn more in Chapter 3  |  Back to Top

C#

Comparison Operators#

  • == : Equal

  • != : Not equal

  • < : Less than

  • <= : Less or equal

  • > : Greater than

  • >= : Greater or equal

Learn more in Chapter 3  |  Back to Top

F#

float() #

Learn more in Chapter 3  |  Back to Top

Function Definition#

def function_name(input_arguments):
    """ Documentation on what your function does """
    
    body of function
    
    return output

Learn more in Chapter 3  |  Back to Top

H#

help()#

Learn more in Chapter 3  |  Back to Top

I#

int()#

Learn more in Chapter 3  |  Back to Top

L#

len(...)#

Length function: Returns the length of given input.

Learn more in Chapter 3  |  Back to Top

Logical (Boolean) operators#

  • and : True if both are true

  • or : True if at least one is true

  • not : True if input is false

Learn more in Chapter 3  |  Back to Top

M#

math library#

Learn more in Chapter 3  |  Back to Top

math.ceil(...)#

Returns the ceiling of the input.

Learn more in Chapter 3  |  Back to Top

math.e#

Returns \(e\).

Learn more in Chapter 3  |  Back to Top

math.exp(...)#

Returns \(e\) to the power of the input.

Learn more in Chapter 3  |  Back to Top

math.factorial(...)#

Returns the factorial of the input.

Learn more in Chapter 3  |  Back to Top

math.floor(...)#

Returns the floor of the input.

Learn more in Chapter 3  |  Back to Top

math.log(...)#

Returns log of input. If no base is specified uses base \(e\).

Learn more in Chapter 3  |  Back to Top

math.pi#

Returns pi.

Learn more in Chapter 3  |  Back to Top

math.sqrt(...)#

Returns the square root of the input.

Learn more in Chapter 3  |  Back to Top

max(...)#

Maximum function: Returns the maximum of the given inputs.

Learn more in Chapter 3  |  Back to Top

min(...)#

Minimum function: Returns the maximum of the given inputs.

Learn more in Chapter 3  |  Back to Top

P#

print(...)#

Print function: Prints the input

Learn more in Chapter 3  |  Back to Top

R#

round(...)#

Rounding function: Returns the rounded input.

Learn more in Chapter 3  |  Back to Top

S#

str()#

Learn more in Chapter 3  |  Back to Top

string.lower()#

Returns a lowercase version of the given string

Learn more in Chapter 3  |  Back to Top

string.replace('old', 'new')#

Replaces any ‘old’ elements with ‘new’ in the given string

Learn more in Chapter 3  |  Back to Top

string.strip()#

Returns the given string with additional spaces at beginning or end removed

Learn more in Chapter 3  |  Back to Top

string.upper()#

Returns an uppercase version of the given string

Learn more in Chapter 3  |  Back to Top

sum(...)#

Sum function: Returns the sum of a given iterable.

Learn more in Chapter 3  |  Back to Top

T#

type(...)#

Data Type function: Returns the datatype of the input.

Learn more in Chapter 3  |  Back to Top

#

\"#

Learn more in Chapter 3  |  Back to Top

\'#

Learn more in Chapter 3  |  Back to Top

\n#

Learn more in Chapter 3  |  Back to Top

\t#

Learn more in Chapter 3  |  Back to Top