You have to design a Food Ordering app for a restaurant The application will have a log-in for admin and users to log-in -------------------------------- Admin ---------------------------------- β‘οΈ Admin will have the following functionalities: β¬ οΈ π 1. Add new food items. Food Item will have the following details: π΄ FoodID //It should be generated automatically by the application. π΄ Name π΄ Quantity. For eg, 100ml, 250gm, 4pieces etc π΄ Price π΄ Discount π΄ Stock. Amount left in stock in the restaurant. π 2. Edit food items using FoodID. π 3. View the list of all food items. π 4. Remove a food item from the menu using FoodID
import json def add(): food_id = len(data) + 1 name = input("Enter the name of food item: ") quantity = input("Enter the quantity of the food item: ") price = input("Enter the price of the food item: ") discount = input("Enter the discount of the food item: ") stock = input("Enter the stock of the food item: ") food_data = {'food_id': food_id, 'name': name,'quantity': quantity,'price': price,'discount': discount,'stock': stock} data.append(food_data) print(data) with open('data.json', 'w') as f: json.dump(data, f) def remove(): remove_id = int(input("Enter the food_id you want to remove: ")) for i in data: if i['food_id'] == remove_id: data.remove(i) print(data) with open('data.json',