F

fabs()

 

Modul: math

Syntax: fabs(x)

Beschreibung: Gibt den Absolutwert von x zurück.

Beispiel:

>>>from math import *

>>>fabs(35-65.8)

30.8

y N

 

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

 

Importbefehle finden Sie unter
y N..

 

Siehe auch die integrierte Funktion
abs().

False

 

Schlüsselwort

Beschreibung: Gibt False zurück, wenn die ausgeführte Anweisung False ist. „False“ steht für einen falschen Wert bei Objekten des Typs „bool“.

Beispiel:

>>>64<=32

False

y : (über »)

 

y N

 

[Fns…] > Ops
B:False

 

[a A #]

 

finally:

 

Schlüsselwort

Beschreibung: Verwenden Sie "finally“ in einem try..except..finally-Codeblock. Weitere Einzelheiten finden Sie in der Python-Dokumentation.

y N

 

float()

 

Modul: Built-in

Syntax: float(x)

Beschreibung: Gibt x als Fließkommazahl zurück.

Beispiel:

>>>float(35)

35.0

>>>float(“1234”)

1234.0

y N

 

[Fns…] > Type
2:float()

 

floor()

 

Modul: math

Syntax: floor(x)

Beschreibung: Gibt die größte ganze Zahl zurück, die kleiner oder gleich x ist.

Beispiel:

>>>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()

Importbefehle finden Sie unter
y N.

 

fmod(x,y)

 

Modul: math

Syntax: fmod(x,y)

Beschreibung: Weitere Einzelheiten finden Sie in der Python-Dokumentation. Wird bevorzugt verwendet, wenn x und y Fließkommazahlen sind.

Gibt möglicherweise nicht das gleiche Ergebnis zurück wie x%y.

Beispiel:

>>>from math import *

>>>fmod(50.0,8.0)

2.0

>>>fmod(-50.0,8.0)

-2.0

>>>-50.0 – (-6.0)*8.0 #Validierung aus der Beschreibung

-2.0

Siehe auch: x%y.

» Modul 1:math
7:fmod()

 

y N

 

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

 

Importbefehle finden Sie unter
y N.

 

for i in list:

 

Schlüsselwort

Syntax: for i in list:

Beschreibung: Zum Iterieren über Listenelemente.

Beispiel:

>>> 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):

 

Schlüsselwort

Syntax: for i in range(size)

Beschreibung: Zum Iterieren über einen Bereich.

Beispiel:

>>> 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):

 

Schlüsselwort

Syntax: for i in range(start,stop)

Beschreibung: Zum Iterieren über einen Bereich.

Beispiel:

>>> 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):

 

Schlüsselwort

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

Beschreibung: Zum Iterieren über einen Bereich.

Beispiel:

>>> 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

 

Modul: Built-in

Syntax:str.format()

Beschreibung: Formatiert die angegebene Zeichenkette. Weitere Einzelheiten finden Sie in der Python-Dokumentation.

Beispiel:

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

+12.340000

y N

 

frexp()

 

Modul: math

Syntax: frexp(x)

Beschreibung: Gibt ein Paar (y,n) zurück, wobei x == y * 2**n. y ist eine Fließkommazahl, wobei 0.5<abs(y)<1; und n ist eine Ganzzahl.

Beispiel:

>>>from math import *

>>>frexp(2000.0)

(0.9765625, 11)

>>>0.9765625 * 2**11 #Beschreibung validieren

2000.0

» Modul 1:math
A:frexp()

 

y N

 

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

 

Importbefehle finden Sie unter
y N.

 

from PROGRAM import *

 

Schlüsselwort

Syntax: from PROGRAM import *

Beschreibung: Zum Importieren eines Programms. Importiert die öffentlichen Attribute eines Python-Moduls in den aktuellen Namensraum.

Shell [Tools]
A:from PROGRAM import *

 

y N

 

from math import *

 

Schlüsselwort

Syntax: from math import *

Beschreibung: Zum Import aller Funktionen und Konstanten aus dem math module.

 

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

 

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

 

y N

 

from random import *

 

Schlüsselwort

Syntax: from random import *

Beschreibung: Zum Import aller Funktionen
aus dem random module.

 

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

 

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

 

y N

 

from time import *

 

Schlüsselwort

Syntax: from time import *

Beschreibung: Zum Import aller Methoden aus dem time-Modul.

Beispiel:

Siehe Beispielprogramm: DASH1.

y N

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

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

 

from ti_system import *

 

Schlüsselwort

Syntax: from ti_system import *

Beschreibung: Zum Import aller Methoden aus dem ti_system-Modul.

Beispiel:

Siehe Beispielprogramm: REGEQ1.

y N

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

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

 

from ti_hub import *

 

Schlüsselwort

Syntax: from ti_hub import *

Beschreibung: Zum Import aller Methoden aus dem ti_hub module. Verwenden Sie für einzelne Ein- und Ausgabegeräte die dynamische Modulfunktionalität, indem Sie das Gerät im Editor im Menü [Fns…]>Modul>ti_hub>Import auswählen.

Siehe ti_hub module – Import zum Editor hinzufügen und ti_hub-Sensormodul zum Modul-Menü hinzufügen.

Beispiel:

Siehe Beispielprogramm: DASH1.

y N