MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / ADD

Function ADD

projects/inventory management/main.py:10–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9
10def ADD():
11 pid = int(input("Enter the product id:"))
12 pname = input("Enter the product name: ")
13 pcost = int(input("Enter the product cost:"))
14 pqty = int(input("Enter the product quantity:"))
15 query = "insert into inventory values({},'{}',{},{})".format(
16 pid, pname, pcost, pqty
17 )
18 cursor.execute(query)
19 con.commit()
20 print("Data Inserted successfully")
21
22
23# Displaying record in List form

Callers

nothing calls this directly

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected