Forbidden Sum

Sometimes a calculation has a special range that must be handled differently from the usual rule. Write a function sorta_sum that takes two numbers a and b and calculates their sum. If the result is from 10 to 19 inclusive, return 20; otherwise, return the normal sum.

Примеры

Ввод
3, 4
Вывод
7
Ввод
9, 4
Вывод
20
Ввод
10, 11
Вывод
21

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

def sorta_sum(a: int, b: int) -> int:

Теги

math
PostgreSQLv16

Hier erscheint das Ergebnis der Codeausführung

Visible tests
1
Input
3, 4
Expected7
2
Input
9, 4
Expected20
3
Input
10, 11
Expected21
4
Input
5, 5
Expected20
5
Input
0, 0
Expected0
6
Input
9, 10
Expected20
Focus radio
Paused · SomaFM · Fluid