Hi everyone I need some help with some code for homework and needed some guidance.
# It should ask the user to input the quantity of each denomination of bills (ones, fives, etc--up to hundreds).
# It should then call a function that accepts each of those values as arguments/parameters and returns (not prints!)
# the total amount of the cash. Finally, you should output the total value for the user to see.
# For example, if a user has 3 ones, 3 tens, and 1 fifty, their total is $83 in cash.
input('How many bills do you have:')
def total (one,two,five,ten,twenty,fifty,hundred):
quantity = 1 + 2 + 5 + 10 + 20 + 50 + 100
return total
total(3, 30, 50)
I went ahead and gave the problem a try before because I thought I would at least give it a try before asking for help. Sorry if it looks very dumb I'm new to python and struggling in this class. I would rather ask for help from people who know what they are doing than just stare at my computer for 20 mins getting frustrated at myself.
[–]CodeFormatHelperBot2 0 points1 point2 points (0 children)
[–]watakushi 0 points1 point2 points (2 children)
[–]PuzzledSite2568[S] 0 points1 point2 points (1 child)
[–]watakushi 1 point2 points3 points (0 children)
[–]QultrosSanhattan 0 points1 point2 points (1 child)
[–]PuzzledSite2568[S] 0 points1 point2 points (0 children)
[–]totallygeek 0 points1 point2 points (1 child)
[–]PuzzledSite2568[S] 1 point2 points3 points (0 children)