Vous êtes sur la page 1sur 2

Niveau : 2ème TI

Matière :
Prof : Mme Raja Mkhinini
COURS :

Séance N°2

rent(19.5) r………
int(x) Ent(x)
r=int(13.2) r=……
rarrondi(3.8) r………
round ( a ) Arrondi(a)
r=round(3.2) r=……
Rracine carrée(2) r………

sqrt ( a ) Racine carrée(a)


from math import *
r=sqrt(4) r=……
Raléa(10,15) r………

randint(a,b) Aléa(vi, vf)


from random import *
r=randint(10,15) r=……
From random import *
uniform(a,b) N'exite pas
r=uniform(0,5) r=……

Web site : www.TakiAcademy.com 1


Niveau : 2ème TI
Matière :
Prof : Mme Raja Mkhinini
COURS :

Ch[i] Ch='bonjour' R= ch[2] R=……


Ch[i]
On commence par 0

Ch[d : f] Sous- Ch'informatique' Rsous-chaine(ch,2,8) R………


On commence par 0, f exclut chaine(ch,d,f) Ch='bonjour' R= ch[0:3] R=……
len ( ch ) Ch"informatique" Llong(ch) L………
Long(ch)
On commence par 1 ch = "bonjour" L= len ( ch ) L=……
Ch1.find ( ch2 ) Ch"bonjour" ppos("o",ch) p………
Ch1 = "Cours python"
Pos(ch2,ch1)
Ch2 = "python" p = Ch1.find (ch2) p=……
On commence par 0 Ch3 = "Python" p = Ch1.find ( ch3 ) p=……
Ch"salut" chmajus(ch) Ch………
ch. upper ( ) Majus(ch)
ch = "bonjour" ch = ch.upper ( ) Ch=……….
Nb=12.35 Chconvch(Nb) Ch………
str ( nb ) convch (nb)
nb = 1235 Ch = str ( nb ) Ch=……….
Ch"2020" nvaleur(ch) n………
int(ch) Valeur (ch) Ch"10.5" nvaleur(ch) n………
ch="12" n= int(ch) n=……….
float(ch) ch="12.36" n=float(ch) n=……….
ch="12.36" n=int(ch) n=……….
R= ord ( "A" ) R………
ord ( car ) Ord(car)
R= ord ( "a" ) R………
C= chr ( 65 ) C………
chr ( x ) Chr(x)
C chr ( 48 ) C………
ch[:d]+ch[:f] Efface(ch,d,f) ch''maison" chefface(ch,1,4) Ch………
On commence par 0, d exclut f exclut ch="maison" ch=ch[:1]+ch[4:] ch=……….
Estnum(ch) Ch""123" Restnum(ch) R………
N'existe pas S"13.25" Restnum(S) R………
Entier ou réel T"12/25A" Restnum(T) R………
Ch.isdigit Ch=""123" Restnum(ch) R=………
N'existe pas
Entier seulement

Web site : www.TakiAcademy.com 2

Vous aimerez peut-être aussi