This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Variable aleatoire: | |
|N| | |
| |x P^K x (1-P)^N-K | |
|K| | |
P(x=??) == K | |
B(?;?) == B(N;P) | |
|N| |N-1| |N-1| | |
| | = | | + | | | |
|K| |K-1| | K | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Programme de conversion binaire-décimal avec affichage des calculs pour NumWorks n110 | |
def binaire_vers_decimal(binaire): | |
decimal = 0 | |
puissance = 0 | |
calculs = [] | |
while binaire != 0: | |
reste = binaire % 10 | |
calculs.append(f"{reste} * 2^{puissance}") |