vadimak wrote:When i am using this codes : 02315782,04395379 its becoming red and saing invalid token
i5-3570 = {02315782 : ('name':i5-3570k,'Price':25,'Barckode':02315782)}
i7-3570 = {02315782 : ('name':i7-3570k,'Price':50,'Barckode':0439379)}
bar_codes = {
'i5-3570' : {02315782 : ('name':i5-3570k,'Price':25,'Barckode':02315782)}
'i7-3570' : {02315782 : ('name':i7-3570k,'Price':50,'Barckode':0439379)}
}
vadimak wrote:Hello i have this sumetive to do :
Mr. is starting a computer parts store in his spare time. He would like to employ his student to write a computer program that would handle the cash sales.
When a customer brings their purchases up to the cash register, the bar code of the item will be scanned by your program. When all the items are scanned, a receipt will be printed out on the computer screen showing
How can i do it ?? i think i should make kind of detabase of products with prices and barcodes . But how?
Thank for any Help
vadimak wrote:Tnx. I cant find examples in internet can you help me.
for exmaple :
i5 3570k - 218$ Barcod - 02315782
i7-3570k 493$ 0439379
How i amking its working i want to buy this items and get total cost?
tnx again
vadimak wrote:
- Code: Select all
i5-3570 = {02315782 : ('name':i5-3570k,'Price':25,'Barckode':02315782)}
i7-3570 = {02315782 : ('name':i7-3570k,'Price':50,'Barckode':0439379)}
How can i make it works now?
i need to input a barcodes for example i want to buy 2 of i5-3570 and 3 of i7-3570 so i am inputing the barocd of i5 two times and i7 three time and then i am press Done and it will show me the price of total .
and i will count downt the stock level ;D
Thank for helping
vadimak wrote:So can some one help me ?
oops i am sorry i didnt pay antation on the changes sorry ;D tnx
- Code: Select all
bc=input("Please scan or type a barcode");
caounter=2
tp=0
if caounter<3:
if bc==04353736:
price="218$"
name="i5-3570k"
if bc==04322575:
price="493$"
name="i7-3570k"
if bc==04201221:
price="40$"
name="CM Hyper 212 Evo"
if bc==03745501:
price="330$"
name="AMD HD 7950"
if bc==01323661:
price="990$"
name="GTX Titan"
if bc==04221214:
price="49$"
name="Haf 912 Advance"
if bc==04664125:
price="67$"
name="8GB (2x4GB) 1600"
if bc==04664125:
price="67$"
name="8GB (2x4GB) 1600"
if bc==07743210:
price="139$"
name="MSI Z77A-G43"
if bc==01236252:
price="99$"
name="ADATA 120GB 6GB/S"
if bc==04625152:
price="48$"
name="Razer Deathader"
if bc==0:
caounter==4
tp==tp+price
print"",tp
8$"
name="Razer Deathader"
tp==tp+price
print"",tp
caounter==4
THis is what i did but its not working. So i was tring to do in a loop. i will input a barckods until i hit "0" and then it will give me a total sum
bc=input("Please scan or type a barcode");
caounter=2
tp=0
if caounter<3:
if bc==04353736:
price="218$"
name="i5-3570k"
if bc==04322575:
price="493$"
name="i7-3570k"
if bc==04201221:
price="40$"
name="CM Hyper 212 Evo"
if bc==03745501:
price="330$"
name="AMD HD 7950"
if bc==01323661:
price="990$"
name="GTX Titan"
if bc==04221214:
price="49$"
name="Haf 912 Advance"
if bc==04664125:
price="67$"
name="8GB (2x4GB) 1600"
if bc==04664125:
price="67$"
name="8GB (2x4GB) 1600"
if bc==07743210:
price="139$"
name="MSI Z77A-G43"
if bc==01236252:
price="99$"
name="ADATA 120GB 6GB/S"
if bc==04625152:
price="48$"
name="Razer Deathader"
if bc==0:
caounter==4
tp==tp+price
print"",tp
8$"
name="Razer Deathader"
tp==tp+price
print"",tp
caounter==4
Users browsing this forum: Bing [Bot] and 3 guests