College Board Error testing
Quite self-explanatory
- What errors may arise in your project?
- What are some test cases that can be used?
- Make sure to document any bugs you encounter and how you solved the problem
- What are “single” tests that you will perform on your project? Or, your part of the project?
menu = {"burger": 3.99,
"fries": 1.99,
"drink": 0.99}
total = 0
#shows the user the menu and prompts them to select an item
print("Menu")
for k,v in menu.items():
print(k + " $" + str(v)) #why does v have "str" in front of it?
#ideally the code should prompt the user multiple times
item = input("Please select an item from the menu")
#code should add the price of the menu items selected by the user
print("Your total:" + " " + str(total) + str(menu.get(item)))
total = menu.get(item)
#shows the user the menu and prompts them to select an item
print("Anything else?")
for k,v in menu.items():
print(k + " $" + str(v)) #why does v have "str" in front of it?
#ideally the code should prompt the user multiple times
item = input("Please select an item from the menu")
if item == "no":
print("Thanks for ordering!")
print("Your total:" + " " + str(total))
else:
print("Your total:" + " " + str(total) + str(menu.get(item)))
total = total + menu.get(item)
while(True):
print("Menu")
for k,v in menu.items():
print(k + " $" + str(v)) #why does v have "str" in front of it?
#ideally the code should prompt the user multiple times
item = input("Please select an item from the menu. If you wish to exit, type no")
if item == "no":
print("Thanks for ordering!")
print("Your total:" + " " + str(total))
break
else:
print("Your total:" + " " + str(total) + str(menu.get(item)))
total = total + menu.get(item)
What are “single” tests that you will perform on your project? Or, your part of the project?
My job is regarding the elements of our project. I need to make sure the elements work as intended, and to do this I will not only have some of my friends test it, but also personally test common and uncommon inputs.