This is a program which asks a user to input a barcode , then my program finds the specified product , asks the user how many of a product they would like to purchase , if they
Well, it is not rounded as intended, because you store it as a String first and round it second.
I would recommend to swap the lines values = [str(product), str(price), str(order*price)]
and price = str(round(price,2))
first try removing all the "global total_price" definitions in your functions.. (it would reset the variable each time)
Secondly in your function search_user_input() i would change the line price = round(float(row[2]),2)
into price = float(row[2])
(you can later use format to display the final float value in the desired format).
Thirdly in your function quantity() you should change the line if continue_shopping !=0 and continue_shopping !=1:
into if continue_shopping ==0 or continue_shopping ==1:
, good luck