Programming Exercises: Itworks L91709029N WWW - It-Works - Io Contact@It-Works - Io +355 4 562 9090
Programming Exercises: Itworks L91709029N WWW - It-Works - Io Contact@It-Works - Io +355 4 562 9090
L91709029N
www.it-works.io
contact@it-works.io
+355 4 562 9090
Programming Exercises
1 Write a function to check if a number is even.
(input 2: output True, input 3: output False)
5 Given a list iterate it and display numbers which are divisible by 5 and if you
find number greater than 150 stop the loop iteration
list1 = [12, 15, 32, 42, 55, 75, 122, 132, 150, 180, 200]
6 Write a function that takes a list of words and groups the words by their length
using a dictionary
Input: [‘Lorem, ‘ele’, ‘sit’, ‘incididunt’, ‘a’, ‘su’, ‘dom’, ‘ouch’, ‘ipsum’’]
Output:
{
1: [‘a’],
2: [‘su’],
3: [‘ele’, ‘sit’, ‘dom’]
5: [‘Lorem’, ‘ipsum’]
10: [‘incididunt’]
}