# -*- coding: utf-8 -*-
"""
Created on Thu May 14 13:06:33 2026

@author: student
"""

def create_dictionaries():
    year = {}
    director = {}
    mark = {}
    while True:
        can_add = input("Czy chcesz dodac kolejny film (n/t). ")
        if can_add.lower() == "n":
            return year, director, mark
        title = input("Podaj tytuł filmu. ")
        year_value = int(input("Podaj rok filmu. "))
        director_value = input("Podaj reżysera filmu. ")
        mark_value = float(input("Podaj ocenę filmu jak liczbę (float). "))
        year[title] = year_value
        director[title] = director_value
        mark[title] = mark_value
        
def write_dictionaries(year, director, mark):
    for key in year.keys():
        print("Tytuł filmu ", key, ", rok ", year[key], ", reżyser ", director[key], ", ocena ", mark[key])

#x = create_dictionaries()
#write_dictionaries(x[0], x[1], x[2])

year, director, mark = create_dictionaries()
write_dictionaries(year, director, mark)


#zadanie 6
def delete_duplicates(l):
    s = set(l)
    x = list(s)
    return x


l = list((1,2,3,1,2))
l = [1,2,3,1,2]

y = delete_duplicates(l)
print(y)    