1
0
forked from tdwojak/Python2018

task06, task07 done

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

View File

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

View File

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