- Why Python programming is awesome
- What are sets and how to use them
- What are the most common methods of set and how to use them
- When to use sets versus lists
- How to iterate into a set
- What are dictionaries and how to use them
- When to use dictionaries versus lists or sets
- What is a key in a dictionary
- How to iterate over a dictionary
- What is a lambda function
- What are the map, reduce and filter functions
-
0-square_matrix_simple.py
- Write a function that computes the square value of all integers of a matrix.
- Prototype:
def square_matrix_simple(matrix=[]):
matrix
is a 2 dimensional array- Returns a new matrix:
- Same size as
matrix
- Each value should be the square of the value of the input
- Initial matrix should not be modified
- You are not allowed to import any module
- You are allowed to use regular loops,
map
, etc.
- Same size as
-
1-search_replace.py
- Write a function that replaces all occurrences of an element by another in a new list.
- Prototype:
def search_replace(my_list, search, replace):
my_list
is the initial listsearch
is the element to replace in the listreplace
is the new element- You are not allowed to import any module
-
2-uniq_add.py
- Write a function that makes the addition of all unique integers in a list (only one time each integer).
- Prototype:
def uniq_add(my_list=[]):
- You are not allowed to import any module
-
3-common_elements.py
- Write a function that returns a set of common elements in two sets.
- Prototype:
def common_elements(set_1, set_2):
- You are not allowed to import any module