mirror of
https://github.com/arthur-pbty/nsi.git
synced 2026-06-03 23:36:19 +02:00
Delete exercise 3.6.1 and exercise 3.6.2 Python files
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
chaine = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
||||
|
||||
from random import randint, choice
|
||||
|
||||
def password(n:int) -> str:
|
||||
r = ''
|
||||
for i in range(n):
|
||||
r += chaine[randint(0, len(chaine))]
|
||||
return r
|
||||
|
||||
print(password(10))
|
||||
|
||||
def password2(n:int) -> str:
|
||||
r = ''
|
||||
for i in range(n):
|
||||
r += choice(chaine)
|
||||
return r
|
||||
|
||||
print(password2(10))
|
||||
Reference in New Issue
Block a user