Skip to content

Bug or not? #1

@AndriyTonkikh

Description

@AndriyTonkikh

i just copy/pasted ur code and see what isi happened:
C:\Users\KateFox777\PycharmProjects\pythonProject\venv\Scripts\python.exe C:/Users/KateFox777/PycharmProjects/pythonProject/main.py
Press A to add product and Q to quit: A
Enter product: Egg
Enter quantity: 54
Press A to add product and Q to quit: A
Enter product: Biscuits
Enter quantity: 7
Press A to add product and Q to quit: Apple
Please select a correct option
Press A to add product and Q to quit: A
Enter product: Apple
Enter quantity: 45
Press A to add product and Q to quit: Q
Enter customer membership: Gold
Egg:$1x54=54
Traceback (most recent call last):
File "C:\Users\KateFox777\PycharmProjects\pythonProject\main.py", line 63, in
makeBill(buyingData, membership)
File "C:\Users\KateFox777\PycharmProjects\pythonProject\main.py", line 56, in makeBill
billAmount += getPrice(key, value)
File "C:\Users\KateFox777\PycharmProjects\pythonProject\main.py", line 28, in getPrice
subtotal = priceData[product] * quantity
KeyError: 'Biscuits'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions