F

fabs()

 

Module: math

Syntax: fabs(x)

Description: Returns the absolute value of x

Example:

>>>from math import *

>>>fabs(35-65.8)

30.8

y N

 

[Fns…] > Modul 1:math...
2:fabs()

 

import commands can be found in
y N.

 

See also Built-in function
abs().

False

 

Keyword

Description: Returns False when statement executed is False. "False" represents the false value of objects of type bool.

Example:

>>>64<=32

False

y : (above »)

 

y N

 

[Fns…] > Ops
B:False

 

[a A #]

 

finally:

 

Keyword

Description: Use finally in a try..except..finally code block. See Python documentation for more details.

y N

 

float()

 

Module: Built-in

Syntax: float(x)

Description: Returns x as a float.

Example:

>>>float(35)

35.0

>>>float(“1234”)

1234.0

y N

 

[Fns…] > Type
2:float()

 

floor()

 

Module: math

Syntax: floor(x)

Description: Returns the largest integer less than or equal to x.

Example:

>>>from math import *

>>>floor(36.87)

36

>>>floor(-36.87)

-37

>>>floor(254)

254

» Modul 1:math
9:floor()

 

y N

 

[Fns…] > Modul 1:math
9:floor()

import commands can be found in
y N

 

fmod(x,y)

 

Module: math

Syntax: fmod(x,y)

Description: See Python documentation for more details. Preferred use is when x and y are floats.

May not return the same result as x%y.

Example:

>>>from math import *

>>>fmod(50.0,8.0)

2.0

>>>fmod(-50.0,8.0)

-2.0

>>>-50.0 – (-6.0)*8.0             #validation from description

-2.0

See also: x%y.

» Modul 1:math
7:fmod()

 

y N

 

[Fns…] > Modul 1:math…
7:fmod()

 

import commands can be found in
y N

 

for i in list:

 

Keyword

Syntax: for i in list:

Description: Used to iterate over list elements.

Example:

>>> for i in [2,4,6]:

…       print(i)

2

4

6

[Fns…] Ctl
7:for i in
list:

 

y N

 

for i in range(size):

 

Keyword

Syntax: for i in range(size)

Description: Used to iterate over a range.

Example:

>>> for i in range(3):

…       print(i)

0

1

2

[Fns…] Ctl
4:for i in range
(
size):

 

y N

 

for i in range(start,stop):

 

Keyword

Syntax: for i in range(start,stop)

Description: Used to iterate over a range.

Example:

>>> for i in range(1,4):

…       print(i)

1

2

3

[Fns…] Ctl
5:for i in range
(
start,stop):

 

y N

 

for i in range(start,stop,step):

 

Keyword

Syntax: for i in range(start,stop,step)

Description: Used to iterate over a range.

Example:

>>> for i in range(1,8,2):

…       print(i)

1

3

4

7

[Fns…] Ctl
6:for i in range
(
start,stop,step):

 

y N

 

str.format()                             string format

 

Module: Built-in

Syntax:str.format()

Description: Formats the given string. See Python documentation for more details.

Example:

>>> print("{+f}".format(12.34))

+12.340000

y N

 

frexp()

 

Module: math

Syntax: frexp(x)

Description: Returns a pair (y,n) where x == y * 2**n. y is float where 0.5<abs(y)<1; and n is integer.

Example:

>>>from math import *

>>>frexp(2000.0)

(0.9765625, 11)

>>>0.9765625 * 2**11             #validate description

2000.0

» Modul 1:math
A:frexp()

 

y N

 

[Fns…] > Modul
1:math
A:frexp()

 

import commands can be found in
y N

 

from PROGRAM import *

 

Keyword

Syntax: from PROGRAM import *

Description: Used to import a program. Imports the public attributes of a Python module into the current name space.

Shell [Tools]
A:from PROGRAM import *

 

y N

 

from math import *

 

Keyword

Syntax: from math import *

Description: Used to import all functions and constants from the math module.

 

» Modul
1:math…
1:from math import *

 

[Fns..] > Modul
1:math…
1:from math import *

 

y N

 

from random import *

 

Keyword

Syntax: from random import *

Description: Used to import all functions
from the random module.

 

» Modul
2:random…
1:from random import *

 

[Fns..] > Modul
2:random…
1:from random import *

 

y N

 

from time import *

 

Keyword

Syntax: from time import *

Description: Used to import all methods from the time module.

Example:

See sample program: DASH1.

y N

» Modul
3:time…
1:from time import *

[Fns…]>Modul
3:time…
1:from time import *

 

from ti_system import *

 

Keyword

Syntax: from ti_system import *

Description: Used to import all methods from the ti_system module.

Example:

See sample program: REGEQ1.

y N

» Modul
4:ti_system…
1:from system import *

[Fns…]>Modul
4:ti_system…
1:from system import *

 

from ti_hub import *

 

Keyword

Syntax: from ti_hub import *

Description: Used to import all methods from the ti_hub module. For individual input and output devices, use the dynamic module functionality by selecting the device from [Fns…]>Modul>ti_hub>Import menu when in the Editor.

See:ti_hub module – Add import to Editor and add ti_hub sensor module to the Modul menu.

Example:

See sample program: DASH1.

y N