def half (sequence):
result = []
for element in sequence:
result = result + [element / 2]
return result
half([1, 2, 3])
[0.5, 1.0, 1.5]
def exclaim (sequence):
result = []
for element in sequence:
result = result + [element + '!']
return result
a = 'hello'
b = 'world'
a + b
'helloworld'
exclaim ([a, b])
['hello!', 'world!']
not sure how to do the second part of this exercise (casting)
c = '🛹'
d = '✨'
exclaim ([c,d])
['🛹!', '✨!']