/
Juliazerom
/
First
Обзор
Документация
Войти
/
Juliazerom
/
First
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
tests/test_api.py
59 строк
1 KB
JuliaZenchenko-QA
first commit 3
29 апр 2026, 07:15
29 апр 2026, 07:15
413b005
Код
Авторство
О чём код?
import pytest def print_hi(name): # Use a breakpoint in the code line below to debug your script. print(f'Hi, {name}') # Press ⌘F8 to toggle the breakpoint. # Press the green button in the gutter to run the script. if __name__ == '__main__': print_hi('И') # See PyCharm help at https://www.jetbrains.com/help/pycharm/ def test(): print_hi("test") # from datetime import datetime # import re # def val_date(dates): # for date in dates: # try: # datetime.strptime(date, "%d.%m.%Y") # except ValueError: # print(f"Invalid date: {date}") # dates = ['01.01.2001', '29.02.2018', '31.06.2015', '25.09.1999'] # val_date(dates) # def divide(a, b): # return a/b # def save_divide(a, b): # try: # result =divide(a, b) # print(result) # except ZeroDivisionError: # print("На ноль делить нельзя") # save_divide(10, 5) # save_divide(10, 0) from collections import Counter def trasfer(s): counts={} for ch in s: counts[ch]=counts.get(ch, 0) + 1 result = "" for ch in s: if counts[ch]==1: result += "U" else: result += "P" return print(result) s="Пример строки с рандомными словами" trasfer(s)