Raindrop Sounds

In this exercise, a number turns into a short "raindrop" string based on divisibility rules. The function convert receives number and adds Pling if it is divisible by 3, Plang if it is divisible by 5, and Plong if it is divisible by 7. If none of the rules match, return the number itself as a string.

Примеры

Ввод
3
Вывод
"Pling"
Ввод
5
Вывод
"Plang"
Ввод
7
Вывод
"Plong"

Нужно реализовать

def convert(number: int) -> str:

Теги

stringsmath
PostgreSQLv16

Tutaj pojawi się wynik wykonania kodu

Visible tests
1
Input
3
Expected"Pling"
2
Input
5
Expected"Plang"
3
Input
7
Expected"Plong"
4
Input
15
Expected"PlingPlang"
5
Input
105
Expected"PlingPlangPlong"
6
Input
34
Expected"34"
Focus radio
Paused · SomaFM · Fluid