Правки по замечанию куратора

This commit is contained in:
Neuf
2025-09-19 00:45:51 +05:00
parent f3c81fda32
commit b79eabe091
4 changed files with 45 additions and 38 deletions

View File

@@ -1,18 +1,20 @@
# TODO здесь писать код
# GPU_list = [3070, 2060, 3090, 3070, 3090]
GPU_list = []
new_GPU_list = []
def input_cards():
gpu_list = []
count_gpu = int(input('Кол-во видеокарт: '))
for i in range(1, count_gpu + 1):
gpu_list.append(int(input(f'{i}-Видеокарта: ')))
count_gpu = int(input('Кол-во видеокарт: '))
def by_cards():
new_gpu_list = []
max_model = max(gpu_list)
for value in gpu_list:
if value != max_model:
new_gpu_list.append(value)
for i in range(1, count_gpu + 1):
GPU_list.append(int(input(f'{i}-Видеокарта: ')))
max_model = max(GPU_list)
for value in GPU_list:
if value != max_model:
new_GPU_list.append(value)
input_cards()
by_cards()
print('\nСтарый список видеокарт:', GPU_list)
print('Новый список видеокарт:', new_GPU_list)