Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Best Number Ever by wolicki.mikolaj
def liczba(text):
wynik=0
for a in text:
if a==".":
wynik=wynik+1
if a==",":
wynik=wynik+2
if a=="/":
wynik=wynik+0
if a=="<":
wynik=wynik-1
if a==">":
wynik=wynik-2
return wynik
def the_best_number():
'Najlepsza liczba jest 15, poniewaz to wlasnie taki numer nosze na mojej bluzie paintballowej w ktorej wystapilem na mistrzostwach Europy reprezentujac Polske'
return liczba("...,,,.,,,<<..<")
def checkio():
return the_best_number()
if __name__ == '__main__':
# These "asserts" using only for self-checking and not necessary for auto-testing
assert isinstance(the_best_number(), (int, float, complex))
Nov. 27, 2016