๐Ÿ”’ Closed Python list

Status
Not open for further replies.

jcruze

Leecher
patulong po. hindi ko kc makuha yung value ng stocks base sa product na pipiliin ng user. sana my makatulong. need help asap. salamat
Screenshot (362).webp
 
Hi. Sana if ma solve mo po yung problem, pwede pa share na lang din po dito for reference hehe Thank you
 
sir bat dika po gumamit ng dictionary? sample

product_inventory = {
"Product_1":100,
"Product_2":200
}

product = input("You want to buy?")
price = product_inventory.get(product)
print(price)
 
Yes I agree with roell21
Magiging mas easy yan kung gagamitan mo ng dictionary.
Saka much better kung papakita mo buong code para pwedeng ma-fix and ma-refactor
 
Status
Not open for further replies.

About this Thread

  • 4
    Replies
  • 462
    Views
  • 5
    Participants
Last reply from:
zackmark29

Online now

Members online
1,011
Guests online
1,044
Total visitors
2,055

Forum statistics

Threads
2,276,215
Posts
28,968,392
Members
1,231,170
Latest member
nico062026
Back
Top