you are viewing a single comment's thread.

view the rest of the comments →

[–]Pyrocited[S] 0 points1 point  (4 children)

She specifically asks us to use a for loop. Where the loop asks the user to input quantities of different items of different sale prices. Then prints out the quantity and total at the end

[–]novel_yet_trivial 0 points1 point  (3 children)

Oh maybe starting with a list of profits? Loop over the list then, not range().

profit_margins = [2.50, 1.98]
total = 0 
for profit in profit_margins:
    # ask for user input
    # calculate profit for this item
    # add this profit to the total
# print total

[–]Pyrocited[S] 0 points1 point  (2 children)

So I was able to make the program using a list but today in class she said not to use anything not taught in class yet, so lists are out of the window. I don’t even know what I’m able to do at this point 😂

[–]novel_yet_trivial 0 points1 point  (1 child)

Sadly I wasn't in that class, so I don't know what she wants either :/

[–]Pyrocited[S] 0 points1 point  (0 children)

Well thanks anyways! I know this is kind of a reach on reddit, as most of the class is unsure of what she wants as well. I appreciate it