<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write(fname, data):
 		""" 		Writes a Json file 		in: fname - file name 			data - dictionary of data to put into the file 		out: nothing, everything is written to a file 		"""

		try:
			with open(fname, 'w') as f:
				json.dump(data, f)

		except IOError:
			raise Exception('Could not open {0!s} for writing'.format((fname)))