R

radians())                  degree 8radians

 

Module: math

Syntax: radians(x)

Description: Converts angle x in degrees to radians.

Example:

>>>from math import *

>>>radians(180.0)

3.141592653589793

>>>radians(90.0)

1.570796326794897

˜ Trig
1:radians()

 

y N

 

[Fns…] > Modul 1:math… > Trig
1:radians()

 

raise

 

Keyword

Syntax: raise exception

Description: Use raise to raise a specified exception and stop your program.

y N

 

randint(min,max)

 

Module: random

Syntax: randint(min,max)

Description: Returns a random integer between min and max.

Example:

>>>from random import *

>>>randint(10,20)

>>>15

Alternate Example:

>>>import random

>>>random.randint(200,450)

306

Results will vary given a random output.

» Modul
2:random
4:randint(min,max)

 

[Fns…] > Modul
2:random…
4:randint(min,max)

 

y N

 

import commands can be found in
y N

 

random()

 

Module: random

Syntax: random()

Description: Returns a floating point number from 0 to 1.0. This function takes no arguments.

Example:

>>>from random import *

>>>random()

0.5381466990230621

Alternate Example:

>>>import random

>>>random.random()

0.2695098437037318

Results will vary given a random output.

» Modul
2:random…
Random
2:random()

 

[Fns…] > Modul
2:random…
Random
2:random()

 

y N

 

import commands can be found in y N

 

random.function

 

Module: random

Syntax: random.function

Description: Use after import random to access a function in the random module.

Example:

>>>import random

>>>random.randint(1,15)

2

Results will vary given a random output.

y N

 

 

randrange(start,stop,step)

 

Module: random

Syntax: randrange(start,stop,step)

Description: Returns a random number from start to stop by step.

Example:

>>>from random import *

>>>randrange(10,50,2)

12

Alternate Example:

>>>import random

>>>random.randrange(10,50,2)

48

Results will vary given a random output.

» Modul
2:random…
Random
6:randrange(
start,stop,step)

 

» Modul
2:random…
Random
6:randrange(
start,stop,step)

 

y N

 

import commands can be found in yN

 

range(start,stop,step)

 

Module: Built in

Syntax: range(start,stop,step)

Description: Use range function to return a sequence of numbers. All arguments are optional. Start default is 0, step default is 1 and sequence ends at stop.

Example:

>>> x = range(2,10,3)

>>> for i in x

…       print(i)

2

5

8

y N

 

.real

 

Module: Built-in

Syntax:var.real

Description: Returns the real part of a specified variable of complex number type.

Example:

>>>a=complex(4,5)

>>>a.real

4

>>>a.imag

5

y N

 

var=recall_list("name")                  1-6

 

Module: ti_system

Syntax:var=recall_list("name")                  1-6

Description: Recall a predefined OS list. List length must be less than or equal to 100.

Argument: "name"

For OS L1-L6

 

1 - 6

 

"1" - "6"

 

'1' - '6'

For OS custom list "name"

----- Max 5 characters, numbers or letters, starting with letters, and letters must be uppercase.

Examples:

"ABCDE"

"R12"

"L1" will be custom L1 and not OS L1

Reminder: Python is double precision. Python supports more digits than in the OS.

Example:

Sample program:

Create a list in the OS.

LIST={1,2,3}

 

Run Python App.

Create a new program AA.

 

import ti_system as *

xlist=recall_list("LIST")

print xlist

 

Run program AA.

Shell displays output.

 

[1.0, 2.0, 3.0]

y N

yK
ti_system
4:var=recall_list()


[Fns…]>Modul or »
4:ti_system
4:var=recall_list()


import commands can be found in y N or in the
ti_system Modul menu.

 

var=recall_RegEQ()       

 

Module: ti_system

Syntax:var=recall_RegEQ()

Description: Recall the RegEQ variable from the CE OS. The regression equation must be computed in the OS prior to recalling RegEQ in the Python App.

Example:

See sample program: REGEQ1.

y N

yK
ti_system
4:var=recall_REGEQ()


[Fns…]>Modul or »
4:ti_system
4:var=recall_REGEQ()


import commands can be found in y N or in the
ti_system Modul menu.

 

.remove(x)

 

Module: Built-in

Syntax: listname.remove(item)

Description: The method remove() removes the first instance of item from a sequence.

Example:

>>>listA = [2,4,6,8,6]

>>>listA.remove(6)

>>>print(listA)

[2,4,8,6]

y 9
List
7:.remove(x)

 

y N

 

[Fns…] > List
7:.remove(x)

 

 

return

 

Module: Built-in

Syntax: return expression

Description: A return statement defines the value produced by a function. Python functions return None by default. See also: def function():

Example:

>>>  def f(a,b):

        return a*b

>>>      f(2,3)

6

y N

 

[Fns…] > Func
1:def function():

 

[Fns…] > Func
2:return

 

.reverse()

 

Module: Built-in

Syntax: listname.reverse()

Description: Reverses the order of items in a sequence.

Example:

>>>list1=[15,-32,4]

>>>list1.reverse()

>>>print(list1)

[4,-32,15]

y N

 

 

round()

 

Module: Built in

Syntax: round(number, digits)

Description: Use round function to return a floating point number rounded to the specified digits. Default digit is 0 and returns the nearest integer.

Example:

>>>round(23.12456)

23

>>>round(23.12456,3)

23.125

y N