-
Notifications
You must be signed in to change notification settings - Fork 73
сделал задания по pythhon #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| return f'Зарплата: {hours * salary_per_our + bonus}' | ||
|
|
||
|
|
||
| print(count_salaru(hours, salary_per_our, bonus)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
| if __name__ == '__main__': | ||
| source_list = list_generator(1, 100, 15) | ||
| print(f'Исходный список: {source_list}') | ||
| print(f'Итоговоый список: {my_list(source_list)}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
| Подсказка: используйте функцию range() и генератор. | ||
| """ | ||
|
|
||
| print([n for n in range(20, 241) if n % 20 == 0 or n % 21 == 0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
|
|
||
|
|
||
| src_list = [2, 2, 2, 7, 23, 1, 44, 44, 3, 2, 10, 7, 4, 11] | ||
| print([n for n in src_list if src_list.count(n) == 1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
|
|
||
| print( | ||
| reduce((lambda x, y: x * y), [i for i in range(100, 1001) if not i % 2]) | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
| iterator = cycle(lst) | ||
|
|
||
| for i in range(len(lst) * 2): | ||
| print(next(iterator), end=' ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
|
|
||
| num = int(input('Ведите число для вычисления его факториала: ')) | ||
| for s, f in fact(num): | ||
| print(f'{s}! = {f}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
| newline = line + '\n' | ||
| result.append(newline) | ||
| with open("test.txt", "w") as my_fail: | ||
| my_fail.writelines(result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
| with open('task_5_2.txt', 'r') as f: | ||
| for i, line in enumerate(f.readlines(), 1): | ||
| print(f'Слов в {i} строке: {count_words(line)}') | ||
| print(f'Количество строк: {count_lines(f)}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
| ) | ||
| print( | ||
| f'Средний доход сотрудников: {sum(workers.values()) / len(workers): .2f}' | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
| f.write(f"{figures[word.lower()]} {delimetr} {digit}\n") | ||
| except IOError as e: | ||
| print(e) | ||
| print('Ошибка ввод-вывода') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
| answer = user_enter.split() | ||
| except ValueError: | ||
| print('Ошибка ввода данных') | ||
| print(sum(map(int, answer))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
| my_dict[subject_name] += int(i[:i.find("(")]) | ||
| except ValueError: | ||
| pass | ||
| print(my_dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
| o += 1 | ||
| middle["average_profit"] = k / o | ||
| all_list = [subjects, middle] | ||
| json.dump(all_list, jf, ensure_ascii=False, indent=4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
|
|
||
|
|
||
| traffic_light = TrafficLight() | ||
| traffic_light.running() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
No description provided.