renamed files and exercise 1.2

This commit is contained in:
Tutur33
2023-11-28 22:39:24 +01:00
parent f39c57c778
commit 24dbf6099f
26 changed files with 19 additions and 6 deletions
@@ -1,5 +0,0 @@
cle = 1891126108268
res = 97 - cle%97
print("La clé de contrçôle de", cle, "est", res)
@@ -5,7 +5,7 @@
bool = True
while bool:
try:
fichier = int(input("What is the size of your file in kio ? "))
fichier = int(input("What is the size of your file in kio? "))
print("Fichier :", fichier, "kio", "=", fichier * 2**10, "octets", "=", fichier * 8 * 2**10, "bits")
bool = False
except:
@@ -0,0 +1,18 @@
# The social security number is made up of 13 digits plus the control key (2 digits).
# Example: 1 89 11 26 108 268 91
# The control key is calculated using the formula :
# Key = 97 - (social security number modulo 97)
# Find the control key for your social security number.
# Why use the control key?
bool = True
while bool:
try:
cle = int(input("What is your control key? "))
res = 97 - cle%97
print("The control key for", cle, "is", res)
bool = False
except:
print("You had to enter a key. Example: 1891126108268")
# The purpose of the control key is to verify the validity of the social security number.f