Skip to content

Practical work 3 Pogorely_E_P#133

Open
evgeniypogoreliy wants to merge 58 commits intoKartavec:masterfrom
evgeniypogoreliy:master
Open

Practical work 3 Pogorely_E_P#133
evgeniypogoreliy wants to merge 58 commits intoKartavec:masterfrom
evgeniypogoreliy:master

Conversation

@evgeniypogoreliy
Copy link
Copy Markdown

Practical work 3

Practical work 3
Practical work 3
Practical work 3
Practical work 3
Practical work 3
Practical work 3
Practical work 3
Comment thread Lesson_01.py Outdated
var_input_first = int(input('Введите первое число: '))
var_input_second = int(input('Введите второе число: '))

print(div(var_input_first, var_input_second))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  1. валидацию нужно делать через try except
  2. y >0:
    res = x/y
    проверьте все листинги на пеп-8

Comment thread Lesson_02.py Outdated
email = input('Введите email:')
tel = input('Введите телефон: ')

print(person(name, sec_name, age, city, email, tel))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

не выполнено
ункция должна принимать параметры как именованные аргументы.

Comment thread Lesson_03.py Outdated
elif c > b > a:
return c + b


Copy link
Copy Markdown

Choose a reason for hiding this comment

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

sum: int
что это?

Comment thread Lesson_04.py Outdated
y = int(input('Введите целое отрицательное число: '))

print(f'Ответ с использывание встроеной функции {my_func(x, y)}')
print(f'Ответ с использованием цикла {my_func_cicle(x, y)}')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Lesson_05.py Outdated
ex = True
else:
res += sum_input(user_input)
print(res)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Lesson_06.py Outdated

input_string = input('Введите слово латинскими буквами в нижнем регистре: ')

print(int_func(input_string))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Lesson_07.py Outdated


input_string = input('Введите слово латинскими буквами в нижнем регистре: ')
print(int_func(input_string))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Lesson_01.py Outdated
print(hours)
print(pay_hour)
print(bonus)
# Не понял как правельно передать параметры в скрипт
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

правельно - правИльно....

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

нужно смотреть вебинары
в них препод-ль все показывает

Comment thread Lesson_02.py Outdated
new_list = [el for i, el in enumerate(my_list) if my_list[i] > my_list[i - 1]]
res = new_list.pop(0)
print(f'Исходный список {my_list}')
print(f'Список с результатом {new_list}')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

new_list.pop(0)
для чкего это?

Comment thread Lesson_03.py Outdated
# Подсказка: используйте функцию range() и генератор.

ls = [el for el in range(20, 241) if el % 20 == 0 or el % 21 == 0]
print(ls)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Lesson_04.py Outdated
my_list = [2, 2, 2, 7, 23, 1, 44, 44, 3, 2, 10, 7, 4, 11]
new_list = [el for i, el in enumerate(my_list) if my_list.count(el) < 2]
print(f'Исходный список {my_list}')
print(f'Список с результатом {new_list}')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Lesson_05.py Outdated


print(f'Список четных значений {[el for el in range(100, 1001) if el % 2 == 0]}')
print(f'Произведение всех элементов списка {reduce(my_func, [el for el in range(100, 1001) if el % 2 == 0])}')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Lesson_06.py Outdated
break
print(el)

from itertools import cycle
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

все импорты строго в начале модуля

Comment thread Lesson_07.py Outdated
print(i)
x += 1
else:
break
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Less_4.py Outdated
print(gaz.show_speed())
print(zaz.show_speed())
print(uaz.police())
print(uaz.show_speed())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Less_5.py Outdated
handle = Handle('Маркер')
print(pen.draw())
print(pencil.draw())
print(handle.draw())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Less_1.py Outdated
[6, 7, 93],
[24, 5, 97]])

print(my_matrix.__add__())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

my_matrix = Matrix([[5, 18, 11],
[6, 17, 23],
[41, 50, 9]],
[[45, 8, 2],
[6, 7, 93],
[24, 5, 97]])

print(my_matrix.add())

с перегрузками не разобрались
нужно складывать два объекта класса
Matrix и add вручную не вызывают

Comment thread Less_2.py Outdated
print(coat.get_sq_full)
print(jacket.get_sq_full)
print(jacket.get_square_c())
print(jacket.get_square_j())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Less_3.py Outdated
print(cells2 - cells1)
print(cells2.make_order(5))
print(cells1.make_order(10))
print(cells1 / cells2)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

а здесь же все правильно
почему тогда в первом так?

Comment thread Less_1.py
print(today.valid(11, 13, 2011))
print(Data.extract('11 - 11 - 2011'))
print(today.extract('11 - 11 - 2020'))
print(Data.valid(1, 11, 2000))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Less_2.py
div = DivisionByNull(10, 100)
print(DivisionByNull.divide_by_null(10, 0))
print(DivisionByNull.divide_by_null(10, 0.1))
print(div.divide_by_null(100, 0))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

не выполнено, в этом задании нужно
-) создать класс-исключение
-) сгенерировать это исключение
-) отловить его через try-except

Comment thread Less_3.py
return f'Вы вышли'

try_except = Error(1)
print(try_except.my_input())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

не выполнено, в этом задании нужно
-) создать класс-исключение
-) сгенерировать это исключение
-) отловить его через try-except

Comment thread Less_4.py


sklad = Sklad()
print(sklad.__dict__)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sklad
транслит

Comment thread Less_5.py
return f'{self.name} {self.series} {self.make} {self.year}'

def action(self):
return 'Печатает'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Less_6.py
print(unit_2.reception())
print(unit_3.reception())
print(unit_1.to_print())
print(unit_3.to_copier())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Comment thread Less_7.py
z_2 = ComplexNumber(3, 4)
print(z_1)
print(z_1 + z_2)
print(z_1 * z_2)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

выполнено

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants