avatar Bite 302. Get and write all code from a JSON file

You are given a sample JSON file containing, among other things, PyBites code for two bites.

Your task is to complete the function to extract the code from the JSON file for each bite and write the code to a file, one file for each bite. The code will be in the "passing_code" key. See the docstring for more information. 

With successful code you will then be able to use it to get and save all of your own passing PyBites code (which can be found under Settings).

See my_code.json for the sample JSON file contents and structure. The test file shows the expected code output.

Login and get coding
go back Intermediate level
Bitecoin 3X

48 out of 50 users completed this Bite.
Will you be the 49th person to crack this Bite?
Resolution time: ~36 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 1.5 on a 1-10 difficulty scale.
» You can do it! 😌

Focus on this Bite hiding sidebars, turn on Focus Mode.

Ask for Help