# Q3
# This function will store a dict to a JSON file.
# Author: Amanda Murray

import json
filename = "testdict.json"
sample = dict (name="fred", age=31, grades=[1,34,55])

def writeDict (obj):
    with open (filename, 'wt') as f:
        json.dump(obj,f)

# test the function
writeDict(sample)
be3ca3ec8db5418b1cd8da11b1ab8417375aa8e9
<mask token>


def writeDict(obj):
    with open(filename, 'wt') as f:
        json.dump(obj, f)


<mask token>

<mask token>


def writeDict(obj):
    with open(filename, 'wt') as f:
        json.dump(obj, f)


writeDict(sample)

<mask token>
filename = 'testdict.json'
sample = dict(name='fred', age=31, grades=[1, 34, 55])


def writeDict(obj):
    with open(filename, 'wt') as f:
        json.dump(obj, f)


writeDict(sample)

import json
filename = 'testdict.json'
sample = dict(name='fred', age=31, grades=[1, 34, 55])


def writeDict(obj):
    with open(filename, 'wt') as f:
        json.dump(obj, f)


writeDict(sample)

# Q3
# This function will store a dict to a JSON file.
# Author: Amanda Murray

import json
filename = "testdict.json"
sample = dict (name="fred", age=31, grades=[1,34,55])

def writeDict (obj):
    with open (filename, 'wt') as f:
        json.dump(obj,f)

# test the function
writeDict(sample)