This is the code that I wrote
You're supposed to make a guy that works like this
If you select order payment number 3 and enter the table number, the price of the table should be eliminated, but what function should I use here?
The explanation is difficult, but I'd appreciate it if you could answer it even if you knew it.
python
dic['price'] = a
It's being used like this.
dic['price'] +=a
If you use it like this, you'll keep adding value to the price.
However, since the dic dictionary does not have an initial value,
if 'price' in dic:
dic['Price'] = 0
else:
dic['price'] += a
You can use it like this.
© 2024 OneMinuteCode. All rights reserved.