Collections in Python
1. Create a random list of 9 elements. Perform the following actions with it:
- add -1 to the end of the list
- add the list elements [-2, -8, -5, -7] to the end of the list
- add 9 as the third element
- count the number of three random numbers (from the list) in the list
- determine the index of the element -5 in the list
- check if -2, -10 are in the list
- sort the list
- reverse the sorted list
2. Create two sets (with 3-5 elements each). One - with a list of items you would gather in case of a zombie apocalypse.
The second - a list of items you would take to the sea.
Example (but feel free to add something of your own):
zombies_are_comming = {'water', 'first aid kit', 'radio', 'flashlight', 'snacks'}
pina_colada_is_waiting = {'swimsuit', 'sunglasses', 'flipflops', 'water', 'snacks'}
Obtain and output the following sets:
- Everything necessary for survival in a zombie apocalypse on the southern coast of Spain (one set + another)
- Items that will help you survive in the apocalypse but will not be useful in the Maldives (if we believe the created sets) (what is in one list and does not appear in the other)
- A list of items needed for both events at the same time - after all, we need to understand what will be in the highest demand next summer (intersection of the sets)
- We did not keep track of the demand, items necessary for both events at the same time have already been taken 😔 Output what remains (symmetric difference)
3. Create an empty dictionary. Insert the following 3 elements into it:
"Inception": {"director": "Christopher Nolan", "year": 2010, "genre": "Sci-Fi"}
"Titanic": {"director": "James Cameron", "year": 1997, "genre": "Romance/Drama"}
"The Matrix": {"director": "Lana Wachowski", "year": 1999, "genre": "Sci-Fi"}
- Output information about Inception. Anticipate the possibility that this element is not in the dictionary (if not, an appropriate message should be displayed)
- Output all movie titles.
- Remove Titanic from the dictionary.
4. You have a list of friends (3-5 people). You sit down to play Battleship (only 2 players per game). Output all possible pairs of combatants. (For three friends, the list will be 1 and 2, 1 and 3, 2 and 3)
5. A marker is simultaneously one of three colors (red, blue, green) and one of three types (professional, children's, office). Output all possible markers.
6. You have a list of friends (3-5 people). You sit down to play Uno (playing in a circle). Output all pairs of who plays with whom (consecutive overlapping pairs taken from the input iterable).
Example:
Players: A, B, C, D
Combinations: AB, BC, CD, DA
Hint: the keyword here is "consecutive pairs"
🟣 7. Create a Counter object from a list of 100 random numbers.
- Output the 2 objects that occur most frequently and how many times they occur
- Remove from the Counter the information about the most frequently occurring element
- Create another list of 10 numbers and update the Counter object with this new list.
🟣 8. Create a deque list from the list [10]
Sequentially generate 10 digits (range from 0 to 20) and add to the list at the beginning (if the number is less than 10) and at the end (if greater than or equal to 10)
Example:
For the sequence 1, 15, 9, 22, 10, 8, 22 the resulting list should look like 8, 9, 1, 10, 15, 22, 10, 22.
Client's review of cooperation with Andrii Panichuk
Collections in PythonI am very satisfied with the result! Everything is done excellently, all requirements and deadlines have been met. I recommend this specialist!
Freelancer's review of cooperation with Yevhen Inchevsky
Collections in PythonThank you for the project!
I am ready to work more!
-
603 4 0 Hello, I am ready to complete it within the day. There is nothing complicated.
-
1337 25 0 Hello. I propose collaboration. I have reviewed your tasks and am ready to complete all of them. Write to me privately, we will discuss options for interaction.
-
1312 25 1 Good day! I have familiarized myself with all your programming tasks in Python and can offer my assistance in their implementation. I have sufficient experience in programming in Python and am ready to take on the tasks.
-
105 Good evening, as far as I understand, it is necessary to complete these 8 tasks, I can solve them. I will describe comments to the lines of code about what is done and where for direct visibility.
-
626 6 0 Good evening, I can do it during the night. The only thing I would like to clarify is 1 detail in a private message.
-
3482 50 0 Good day
I will do it
I will do it
I will do it
Write to me, we will discuss
I am ready to do it
-
3012 73 4 2 Good day! I have experience = I can do it!!!!!!!!!! Feel free to contact me!!!!
Current freelance projects in the category Databases & SQL
1C database for the enterpriseA database is needed for managing the auto dismantling inventory, controlling finances, and generating orders. It is necessary to add a car as an object and attach parts to it. I will explain the full structure of how it should look and work during the conversation. Databases & SQL ∙ 2 hours 24 minutes back ∙ 2 proposals |
1C data integrationOrganize quality preparation and data transfer from 1C to BigQuery for further use in Looker:Organize the data according to the required fields.Prepare a clear structure of tables and intermediate datasets on which dashboards will be built.Set up data loading, gather key… Databases & SQL, Data Processing ∙ 1 day 8 hours back ∙ 9 proposals |
Development of a simple controlling and management record system in Google Sheets "turnkey"Task name: Development of a simple controlling and management record system in Google Sheets "turnkey" for a construction company in Poland (+ online training and implementation assistance) About the company, context, and my main problem Hello, I am looking for an experienced… Databases & SQL, Accounting Services ∙ 2 days 13 hours back ∙ 33 proposals |
Development of an analytical Power BI dashboard
45 USD
This is our request, we need a person who understands Power BI: Screen 1: Strategic Cockpit (Financial Health of the Plant) Goal: To understand in 5 seconds, "where are we losing money and how much?". KPI Tiles (Top Bar): Overall margin (Actual vs Plan) in %. Amount of "lost… Databases & SQL ∙ 2 days 16 hours back ∙ 13 proposals |
Project: Basic Setup of End-to-End Analytics (Analytics Engineer / Data Analyst)
203 USD
About us and current stack: We are a B2C web product. Currently, we have disparate data that needs to be consolidated into a single system for marketing decision-making. Database: PostgreSQL (user data). Payments: Stripe. Web analytics: Google Analytics 4. Traffic sources:… Databases & SQL ∙ 4 days 11 hours back ∙ 10 proposals |