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 welcomePlease solve all tasks. Tnx Python Task Define a checkparity 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 seconds. Inside the main function define a list of random numbers ranging from to use random module Build a list of numbers through list comprehension syntax. After that, save to task list
Object task that will execute the paritycheck coroutine for each number from the list also through the list understanding Finally, using asyncio.gather run all coroutines concurrently and print results.
Task Define a coroutine securedata that will simulate encryption of sensitive data. Since in practice encryption is done on the server side, the coroutine will simulate data encryption for seconds. The coroutine receives as an argument a dictionary of sensitive data consisting of the keys last name cardnumber and CVV Define a list with dictionaries of sensitive data. Store the tasks in the list as in the previous task and call the tasks using asyncio.gather The coroutine securedata must return a new dictionary for each dictionary in the form: last name': last name, 'cardnumber': 'encrypted', CVV: 'encrypted' For fake encryption, use the hashstr function that only returns the hash value of the input string.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
