Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Lesson_4/Les4_Task1.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
else:
print(f'Salary= {float(argv[1]) * float(argv[2]) + float(argv[3])}')


1 change: 1 addition & 0 deletions Lesson_4/Les4_Task2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

2 changes: 2 additions & 0 deletions Lesson_4/Les4_Task3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions Lesson_4/Les4_Task4.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@

filtred_list = [ i for i in my_list if my_list.count(i)==1]
print(filtred_list)
#Попытка2
3 changes: 2 additions & 1 deletion Lesson_4/Les4_Task5.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
print(total)
#попытка2
4 changes: 3 additions & 1 deletion Lesson_4/Les4_Task6.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
counter += 1
if counter > 10:
break
print(i)
print(i)

#попытка2
1 change: 1 addition & 0 deletions Lesson_4/Les4_Task7.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ def fact(num):
x = 10
for y, z in enumerate(fact(x)):
print(f'!{y+1} {z}')
#попытка2
10 changes: 10 additions & 0 deletions Lesson_5/L5_t3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Иванов 35245.23
Петров 56325.35
Чирков 95354.23
Сидоров 56353.22
Задорнов 98321.44
Алексеев 62354.12
Сергеев 35543.32
Александров 35435.24
Владимиров 36533.24
Смирнов 16355,6
8 changes: 8 additions & 0 deletions Lesson_5/Les5_Task1.py
Original file line number Diff line number Diff line change
@@ -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)

11 changes: 11 additions & 0 deletions Lesson_5/Les5_Task2.py
Original file line number Diff line number Diff line change
@@ -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)



2 changes: 2 additions & 0 deletions Lesson_5/Les5_Task3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
with open('L5_t3.txt', 'r') as my_file:

7 changes: 7 additions & 0 deletions Lesson_5/Text.txt
Original file line number Diff line number Diff line change
@@ -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