File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #Created by lifedestroyed & ld.team, 2025. https://github.com/lifedestroyed/ & https://teamld.github.io/
2-
31import random
2+ import string
43
54# Приветствие
65def greet ():
@@ -22,6 +21,12 @@ def greet():
2221# Словарь для хранения паролей
2322passwords = {}
2423
24+ # Функция для генерации случайного пароля
25+ def generate_random_password (length = 12 ):
26+ characters = string .ascii_letters + string .digits + string .punctuation
27+ password = '' .join (random .choice (characters ) for _ in range (length ))
28+ return password
29+
2530# Функции для управления рейтингами фильмов
2631def show_movies ():
2732 print ("Список фильмов и их рейтинги:" )
@@ -63,9 +68,9 @@ def show_passwords():
6368
6469def add_password ():
6570 name = input ("Введите название для пароля: " )
66- password = input ( "Введите пароль: " )
71+ password = generate_random_password ( )
6772 passwords [name ] = password
68- print ("Пароль для '{}' добавлен. " .format (name ))
73+ print ("Пароль для '{}' добавлен: {} " .format (name , password ))
6974
7075def remove_password ():
7176 name = input ("Введите название пароля для удаления: " )
You can’t perform that action at this time.
0 commit comments