Question: Please program like begginer! copypaste solutions from chat gpt are no welcome . Please solve all tasks. Tnx - - > Python Task 1 .

Please program like begginer! copypaste solutions from chat gpt are no welcome.Please solve all tasks. Tnx -->Python Task 1.4. Define a check_parity coroutine that will simulate the "super demanding operation" of the check number parity via an external API. The coroutine receives as an argument the number to be checked parity, and returns the message "Number \{number\} is even." or "Number \{number\} is odd." after 2 seconds. Inside the main function define a list of 10 random numbers ranging from 1 to 100(use random module). Build a list of numbers through list comprehension syntax. After that, save to task list
10 Object task that will execute the parity_check coroutine for each number from the list (also through the list understanding). Finally, using asyncio.gather(), run all coroutines concurrently and print results.
Task 2.5. Define a coroutine secure_data that will simulate encryption of sensitive data. Since in practice encryption is done on the server side, the coroutine will simulate data encryption for 3 seconds. The coroutine receives as an argument a dictionary of sensitive data consisting of the keys last name , card_number and CVV. Define a list with 3 dictionaries of sensitive data. Store the tasks in the list as in the previous task and call the tasks using asyncio.gather(). The coroutine secure_data must return a new dictionary for each dictionary in the form: \{'last name': last name, 'card_number': 'encrypted', 'CVV': 'encrypted'\}. For fake encryption, use the hash(str) function that only returns the hash value of the input string.
Please program like begginer! copypaste solutions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!