These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references.
Students may use these solutions for personal skill-building and practice.
Unethical use is strictly forbidden.
# variable to store colors
colors = ['purple', 'light blue', 'maroon', 'orange', 'red', 'yellow', 'green', 'dark blue']
# variable to store sizes
sizes = [2, 3, 3, 3, 3, 3, 3, 2]
# variable to store costs
costs = [50, 50, 100, 100, 150, 150, 200, 200]
# prompt user for color
color = input("Which color block will you be building on? ")
# prompt user for budget
budget = int(input("How much money do you have to spend? "))
# find index of color
index = -1
for i in range(len(colors)):
if colors[i] == color:
index = i
This is only a preview of the solution.
Please use the purchase button to see the entire solution.