1
0
forked from tdwojak/Python2018

task08, task09 done

This commit is contained in:
puderniczka 2018-06-02 22:22:16 +02:00
parent c9dd223315
commit b1a003874e
2 changed files with 20 additions and 2 deletions

View File

@ -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]]

View File

@ -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):