forked from tdwojak/Python2018
task06, task07 done
This commit is contained in:
parent
102e7db81e
commit
c9dd223315
@ -10,7 +10,14 @@ ma być zwracany napis "It's not a Big 'No!'".
|
||||
"""
|
||||
|
||||
def big_no(n):
|
||||
pass
|
||||
if n < 5:
|
||||
return "It's not a Big 'No!'"
|
||||
w = 'N'
|
||||
for i in range(n):
|
||||
w += 'O'
|
||||
w += '!'
|
||||
return w
|
||||
|
||||
|
||||
def tests(f):
|
||||
inputs = [[5], [6], [2]]
|
||||
|
@ -6,7 +6,11 @@ Napisz funkcję char_sum, która dla zadanego łańcucha zwraca
|
||||
sumę kodów ASCII znaków.
|
||||
"""
|
||||
def char_sum(text):
|
||||
pass
|
||||
suma = 0
|
||||
for a in text:
|
||||
suma += ord(a)
|
||||
#print suma
|
||||
return suma
|
||||
|
||||
def tests(f):
|
||||
inputs = [["this is a string"], ["this is another string"]]
|
||||
|
Loading…
Reference in New Issue
Block a user