Skip to content

Latest commit

 

History

History

0x04-python-more_data_structures

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Project: 0x04. Python - More Data Structures: Set, Dictionary

This directory contains projects focused on understanding and implementing more advanced data structures in Python, specifically sets and dictionaries. The tasks cover concepts such as set operations, dictionary operations, and various methods associated with these data structures.

Resources

Read or watch

Learning Objectives

General

  • 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

Tasks

Task File Description
0. Squared simple 0-square_matrix_simple.py Write a function that computes the square value of all integers of a matrix.
1. Search and replace 1-search_replace.py Write a function that replaces all occurrences of an element by another in a new list.
2. Unique addition 2-uniq_add.py Write a function that adds all unique integers in a list (only once for each integer).
3. Present in both 3-common_elements.py Write a function that returns a set of common elements in two sets.
4. Only differents 4-only_diff_elements.py Write a function that returns a set of all elements present in only one set.
5. Number of keys 5-number_keys.py Write a function that returns the number of keys in a dictionary.
6. Print sorted dictionary 6-print_sorted_dictionary.py Write a function that prints a dictionary by ordered keys.
7. Update dictionary 7-update_dictionary.py Write a function that replaces or adds key/value in a dictionary.
8. Simple delete by key 8-simple_delete.py Write a function that deletes a key in a dictionary.
9. Multiply by 2 9-multiply_by_2.py Write a function that returns a new dictionary with all values multiplied by 2.
10. Best score 10-best_score.py Write a function that returns a key with the biggest integer value.
11. Multiply by using map 11-multiply_list_map.py Write a function that returns a list with all values multiplied by a number without using loops.
12. Roman to Integer 12-roman_to_int.py Write a function that converts a Roman numeral to an integer.
13. Weighted average! 100-weight_average.py Write a function that returns the weighted average of all integers tuple (<score>, <weight>).
14. Squared by using map 101-square_matrix_map.py Write a function that computes the square value of all integers of a matrix using map.
15. Delete by value 102-complex_delete.py Write a function that deletes keys with a specific value in a dictionary.
16. CPython #1: PyBytesObject 103-python.c Create a C function that prints some basic info about Python lists.