<jupyter_start><jupyter_text>**Adding new item to inventory**<jupyter_code>fd=open("record.json","r")
r=fd.read()
fd.close()

import json
record = json.loads(r)
record
prod_id = str(input("Enter product Id: "))
name = str(input("Enter product name: "))
pr=int(input("Enter price: "))
qn=int(input("Enter quantity"))

record[prod_id]={'name':name,'pr':pr,'qn':qn}
record
js=json.dumps(record)
fd=open("record.json","w")
fd.write(js)
fd.close()
record<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20876826722338204, 'fraction_numerical': 0.0, 'mean_word_length': 9.212765957446809, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '99477', 'license': 'Apache-2.0', 'n_tokens_mistral': 192, 'n_tokens_neox': 189, 'n_words': 31, 'path': 'IMS(adding).ipynb', 'repo_name': 'shaikhaisha2707/Skill-India-AI-ML-Scholarship', 'size': '479'}