| about | help | done | prefs | create account |
Python > Logic-1 > sorta_sum
prev | next | chance
| Given 2 ints, a and b, return their sum. However, sums in the range 10..19 inclusive, are forbidden, so in that case just return 20.
sorta_sum(3, 4) → 7 sorta_sum(9, 4) → 20 sorta_sum(10, 11) → 21 ...Save, Compile, Run See also Python Example Code. Python help docs: Python Strings | Python Lists | Python If Boolean |
Forget It! -- delete my code for this problem 115.0
Copyright Nick Parlante 2006-10 - privacy