Semaine 3 Base De Python Flashcards

1
Q

Type de variables

A

Nbr entiers, nbr à virgules, chaînes de caractères, booléens, listes, dictionnaires

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Nbr. Entiers

A

Int → x=5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Nbr à virgules flottants

A

Float → y =7,5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Chaînes de caractères

A

String → salutation =’ Bienvenu à l’école”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Booléens

A

Bool→ vrai I faux

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Listes

A

List → suite nombre = ( 1,2,3 )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Dictionnaires

A

Dict → voiture = { “Ford” : [‘mustang’ ]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Affichage de résultats

A

Print(x) et prénom=sruthi

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Commentaires

A

Symbole : #
Python exécute pas les commentaires
Utile pour : expliquer code, rends le code plus visible, empêche l’exécution des test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Nomenclature / règle de syntaxe

A

Composés de lettres/chiffres/ caractère de soulignement. Mais pas commencer par chiffre, être précis et clair

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Changement de type

A

X=7,5
X= str(x)
Point (type (x))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Opérations numérique

A

Addition, soustraction, multiplication, division reéle, division entière modulo,’ puissance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Division réelle

A

/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Division entière

A

// → 3//2= 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Modulo

A

%→ reste → 7/ 5 = 1 et 2 reste

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Affectation multiple

A

A=b=1
Point (“a=”, A’ “et b=” b) ‘

17
Q

Opération, expressions encheminement

A

Instructions e font 1 par 1

18
Q

Opérateurs de comparaisons

A

Test de valeurs av. bool, utilisé avec branchement conditionnel