Open
Conversation
| return f'Зарплата: {hours * salary_per_our + bonus}' | ||
|
|
||
|
|
||
| print(count_salaru(hours, salary_per_our, bonus)) |
| if __name__ == '__main__': | ||
| source_list = list_generator(1, 100, 15) | ||
| print(f'Исходный список: {source_list}') | ||
| print(f'Итоговоый список: {my_list(source_list)}') |
| Подсказка: используйте функцию range() и генератор. | ||
| """ | ||
|
|
||
| print([n for n in range(20, 241) if n % 20 == 0 or n % 21 == 0]) |
|
|
||
|
|
||
| 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]) |
|
|
||
| print( | ||
| reduce((lambda x, y: x * y), [i for i in range(100, 1001) if not i % 2]) | ||
| ) |
| iterator = cycle(lst) | ||
|
|
||
| for i in range(len(lst) * 2): | ||
| print(next(iterator), end=' ') |
|
|
||
| num = int(input('Ведите число для вычисления его факториала: ')) | ||
| for s, f in fact(num): | ||
| print(f'{s}! = {f}') |
| newline = line + '\n' | ||
| result.append(newline) | ||
| with open("test.txt", "w") as my_fail: | ||
| my_fail.writelines(result) |
| 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)}') |
| ) | ||
| print( | ||
| f'Средний доход сотрудников: {sum(workers.values()) / len(workers): .2f}' | ||
| ) |
| f.write(f"{figures[word.lower()]} {delimetr} {digit}\n") | ||
| except IOError as e: | ||
| print(e) | ||
| print('Ошибка ввод-вывода') |
| answer = user_enter.split() | ||
| except ValueError: | ||
| print('Ошибка ввода данных') | ||
| print(sum(map(int, answer))) |
| my_dict[subject_name] += int(i[:i.find("(")]) | ||
| except ValueError: | ||
| pass | ||
| print(my_dict) |
| o += 1 | ||
| middle["average_profit"] = k / o | ||
| all_list = [subjects, middle] | ||
| json.dump(all_list, jf, ensure_ascii=False, indent=4) |
|
|
||
|
|
||
| traffic_light = TrafficLight() | ||
| traffic_light.running() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.