diff --git a/Lesson_4/Les4_Task1.py b/Lesson_4/Les4_Task1.py index 3ee68e9..dd58872 100644 --- a/Lesson_4/Les4_Task1.py +++ b/Lesson_4/Les4_Task1.py @@ -5,3 +5,4 @@ else: print(f'Salary= {float(argv[1]) * float(argv[2]) + float(argv[3])}') + diff --git a/Lesson_4/Les4_Task2.py b/Lesson_4/Les4_Task2.py index a1545e3..f51e2f4 100644 --- a/Lesson_4/Les4_Task2.py +++ b/Lesson_4/Les4_Task2.py @@ -9,3 +9,4 @@ filtred_list = [my_list[i] for i in range(1, len(my_list)) if my_list[i]>my_list[i-1]] print(filtred_list) + diff --git a/Lesson_4/Les4_Task3.py b/Lesson_4/Les4_Task3.py index 613f026..5f7d745 100644 --- a/Lesson_4/Les4_Task3.py +++ b/Lesson_4/Les4_Task3.py @@ -7,3 +7,5 @@ filtred_list = [my_list[i] for i in range(1, len(my_list)) if my_list[i]%20==0 or my_list[i]%21==0] print(filtred_list) + +#Попытка2 \ No newline at end of file diff --git a/Lesson_4/Les4_Task4.py b/Lesson_4/Les4_Task4.py index ff5e8af..da502ec 100644 --- a/Lesson_4/Les4_Task4.py +++ b/Lesson_4/Les4_Task4.py @@ -8,3 +8,4 @@ filtred_list = [ i for i in my_list if my_list.count(i)==1] print(filtred_list) +#Попытка2 diff --git a/Lesson_4/Les4_Task5.py b/Lesson_4/Les4_Task5.py index 2518293..326fa3b 100644 --- a/Lesson_4/Les4_Task5.py +++ b/Lesson_4/Les4_Task5.py @@ -8,4 +8,5 @@ num_list=[i for i in range(100,1001) if i%2==0] total=reduce(lambda x, y: x * y, num_list) -print(total) \ No newline at end of file +print(total) +#попытка2 \ No newline at end of file diff --git a/Lesson_4/Les4_Task6.py b/Lesson_4/Les4_Task6.py index 7f2d83d..8048ce7 100644 --- a/Lesson_4/Les4_Task6.py +++ b/Lesson_4/Les4_Task6.py @@ -11,4 +11,6 @@ counter += 1 if counter > 10: break - print(i) \ No newline at end of file + print(i) + +#попытка2 \ No newline at end of file diff --git a/Lesson_4/Les4_Task7.py b/Lesson_4/Les4_Task7.py index 8baa8dd..2c1c990 100644 --- a/Lesson_4/Les4_Task7.py +++ b/Lesson_4/Les4_Task7.py @@ -6,3 +6,4 @@ def fact(num): x = 10 for y, z in enumerate(fact(x)): print(f'!{y+1} {z}') +#попытка2 diff --git a/Lesson_5/L5_t3.txt b/Lesson_5/L5_t3.txt new file mode 100644 index 0000000..94326f2 --- /dev/null +++ b/Lesson_5/L5_t3.txt @@ -0,0 +1,10 @@ +Иванов 35245.23 +Петров 56325.35 +Чирков 95354.23 +Сидоров 56353.22 +Задорнов 98321.44 +Алексеев 62354.12 +Сергеев 35543.32 +Александров 35435.24 +Владимиров 36533.24 +Смирнов 16355,6 diff --git a/Lesson_5/Les5_Task1.py b/Lesson_5/Les5_Task1.py new file mode 100644 index 0000000..5f5382d --- /dev/null +++ b/Lesson_5/Les5_Task1.py @@ -0,0 +1,8 @@ + +with open("text.txt", 'r') as file_obj: + content = file_obj.read() + end = () + print(content) + for i in content: + print(i) + diff --git a/Lesson_5/Les5_Task2.py b/Lesson_5/Les5_Task2.py new file mode 100644 index 0000000..4053b2b --- /dev/null +++ b/Lesson_5/Les5_Task2.py @@ -0,0 +1,11 @@ + +with open("text.txt", 'r') as file_obj: + content = (file_obj.readlines()) + print('В файле Text',len(content),'строк') + for i in range(len(content)): + content_1 = content[i].split() + print('В', i + 1,'строке', len(content_1), 'слов(а)') + print(content) + + + diff --git a/Lesson_5/Les5_Task3.py b/Lesson_5/Les5_Task3.py new file mode 100644 index 0000000..75c0566 --- /dev/null +++ b/Lesson_5/Les5_Task3.py @@ -0,0 +1,2 @@ +with open('L5_t3.txt', 'r') as my_file: + diff --git a/Lesson_5/Text.txt b/Lesson_5/Text.txt new file mode 100644 index 0000000..60ca598 --- /dev/null +++ b/Lesson_5/Text.txt @@ -0,0 +1,7 @@ +Hello! +My name is Olesia +I am studying at the online university "Geek Brains" +bla-bla +bla bla bla +bla +bla-bla, bla, bla