Riya wants to write a program in Python to update the following record in the table named Product in MYSQL database, SHOP:
pid(Product ID) - integer
pname(Product Name) - string
price(Product Price) – float
Note the following to establish connectivity between Python and MySQL:
-
Username - root
-
Password - tiger
-
Host - localhost
The value of pid has to be accepted from the user and the price has to be increased by 10%. Help Riya to write the program in Python.
Answer:
Answer by student
Detailed answer by teachoo
The rest of the post is locked. Join Teachoo Black to see the full post.