forked from tdwojak/Python2018
task08, task09 done
This commit is contained in:
parent
c9dd223315
commit
b1a003874e
@ -7,7 +7,12 @@ przez 3 lub 5 mniejszych niż n.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def sum_div35(n):
|
def sum_div35(n):
|
||||||
pass
|
suma = 0
|
||||||
|
for i in range(1,n,1):
|
||||||
|
if (i % 3 == 0) or (i % 5 == 0):
|
||||||
|
suma += i
|
||||||
|
return suma
|
||||||
|
|
||||||
|
|
||||||
def tests(f):
|
def tests(f):
|
||||||
inputs = [[10], [100], [3845]]
|
inputs = [[10], [100], [3845]]
|
||||||
|
@ -9,7 +9,20 @@ Np. leet('leet') powinno zwrócić '1337'.
|
|||||||
|
|
||||||
|
|
||||||
def leet_speak(text):
|
def leet_speak(text):
|
||||||
pass
|
w = ''
|
||||||
|
for a in text:
|
||||||
|
if a == 'e':
|
||||||
|
w += '3'
|
||||||
|
elif a == 'l':
|
||||||
|
w += '1'
|
||||||
|
elif a == 'o':
|
||||||
|
w += '0'
|
||||||
|
elif a == 't':
|
||||||
|
w += '7'
|
||||||
|
else:
|
||||||
|
w += a
|
||||||
|
#print(w)
|
||||||
|
return w
|
||||||
|
|
||||||
|
|
||||||
def tests(f):
|
def tests(f):
|
||||||
|
Loading…
Reference in New Issue
Block a user