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
7 changes: 7 additions & 0 deletions #1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from sys import argv

hours = int(argv[1])
hourly_rate = int(argv[2])
bonuses = int(argv[3])

print(f'Заработная плата сорудников {hours * hourly_rate / bonuses}')
3 changes: 3 additions & 0 deletions #2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int_list = [300, 2, 12, 44, 1, 1, 4, 10, 7, 1, 78, 123, 200]
sec_list = [el for el in int_list[1:] if el > int_list[int_list.index(el)-1]]
print(sec_list)
2 changes: 2 additions & 0 deletions #3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
list = [x for x in range(20, 241) if x % 20 == 0 or x % 21 == 0]
print(list)
3 changes: 3 additions & 0 deletions #4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
list = [2, 2, 2, 7, 23, 1, 44, 44, 3, 2, 10, 7, 4, 11]
new_list = [x for x in list if list.count(x) == 1]
print(new_list)
4 changes: 4 additions & 0 deletions #5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from functools import reduce

my_list = [x for x in range(100, 1001) if x%2 == 0]
print(reduce(lambda x, y: x*y, my_list))
19 changes: 19 additions & 0 deletions #6.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from itertools import cycle, count


n = 3
list = [1, 2, 3, 'abd', 4]


for a in count(n):
if a == n+10:
break
print(a)

c = 0

for a in cycle(list):
print(a)
c+=1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

форматирование

if c == 10:
break
11 changes: 11 additions & 0 deletions #7.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def fac(n):
result = 1
for i in range(1, n+1):
Copy link

@luchanos luchanos Sep 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

форматирование арифметических операций: n + 1

result *= i
yield result



n = 4
for el in fac(n):
print(el)
1 change: 0 additions & 1 deletion README.md

This file was deleted.