mirror of
https://github.com/arthur-pbty/nsi.git
synced 2026-06-03 23:36:19 +02:00
renamed files and exercise 1.2
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
cle = 1891126108268
|
||||
|
||||
res = 97 - cle%97
|
||||
|
||||
print("La clé de contrçôle de", cle, "est", res)
|
||||
+1
-1
@@ -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
|
||||
Reference in New Issue
Block a user