C

ceil()

 

Module: math

Syntax: ceil(x)

Description: Returns the smallest integer greater than or equal to x.

Example:

>>>from math import *

>>>ceil(34.46)

35

>>>ceil(678)

678

» Modul 1:math... Math
8:ceil()

 

y N

 

[Fns...] Modul 1:math...Math
8:ceil()

 

import commands can be found in
y N

choice(sequence)

 

Module: random

Syntax: choice(sequence)

Description: Returns a random element from a non-empty sequence.

Example:

>>>from random import *

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

>>>choice(listA)             #Your result may differ.

4

» Modul
2:random...
Random  
5:choice(sequence)

 

y N 

 

[Fns...] Modul
2:random...
Random 
5:choice(sequence)

 

import commands can be found in
y N

 

chr(integer)

 

Module: Built-in

Syntax: chr(integer)

Description: Returns a string from an integer input representing the unicode character.

See Python documentation for more details.

Example:

>>> char(40)

'('

>>> char(35)

'#'

y N

 

class

 

Keyword

Description: Use class to create a class. See Python documentation for more details.

y N

 

cls()                  clear screen

 

Module: ti_plotlib

Syntax: plt.cls()                  clear screen

Description: Clears Shell screen for the plotting. Shortcut keys are not in display when plotting.

Note: plt.cls() has a different behavior than ti_system module disp_clr().

Example:

See sample program: GRAPH.

y N

[Fns...]>Modul or »
5:ti_plotlib...> Setup
2:cls()

[Fns...]>Modul or »
5:ti_plotlib...> Draw
2:cls()


import commands can be found in y N or in the
ti_plotlib Setup menu.

 

color(r,g,b)                  0-255

 

Module: ti_plotlib

Syntax: plt.color(r,g,b)                  0-255

Description: Sets the color for all following graphics/plotting. (r,g,b) values must be specified 0-255. Color specified is used in plot display until color() is again executed with a different color.

Default color is black upon importing ti_plotlib.

Example:

See sample program: COLORLIN.

y N

[Fns...]>Modul or »
5:ti_plotlib...> Draw
1:color()


import commands can be found in y N or in the ti_plotlib Setup menu.

 

complex(real,imag)       

 

Module: Built-in

Syntax: complex(real,imag)       

Description: Complex number type.

Example:

>>>z = complex(2, -3)

>>>print(z)

(2-3j)

>>>z = complex(1)

>>>print(z)

(1+0j)

>>>z = complex()

>>>print(z)

0j

>>>z = complex("5-9j")

>>>print(z)

(5-9j)

Note: "1+2j" is correct syntax. Spaces such as "1 + 2j" will display an Exception.

y N

[Fns...]>Type>
5:complex()

 

continue

 

Keyword

Description: Use continue in a for or while loop to end the current iteration. See Python documentation for more details.

y N

 

cos()

 

Module: math

Syntax: cos(x)

Description: Returns cos of x. Angle argument is in radians.

Example:

>>>from math import *

>>>cos(0)

1.0

>>>cos(pi/2)

6.123233995736767e-17

Alternate Example:

>>>import math

>>>math.cos(0)

1.0

Note: Python displays scientific notation using e or E. Some math results in Python will be different than in the CE OS.

˜ Trig
4: cos()

 

y N

 

[Fns...] Modul 1:math... > Trig
4:cos()

 

.count()

 

Module: Built-in

Syntax: listname.count(item)

Description: count()is a method that returns the number of occurrences of an item in a list, tuple, bytes, str, bytearray, or array.array object.

Example:

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

>>>listA.count(2)

4

y N