Oct-19-2022, 12:01 PM
Hello,
I'm trying to complete my workbook for university, but I'm stuck on this question: Write a program that determines how many of each coin ( from 1p to 50p) a vending machine should dispense for different amounts of change. You should print a row for each value of change between 0 and 99 and columns for the change required.
For example, the start of the table should look like the following:
(Attached as well).
The table should go up to 99p.
All I have is this code:
If I can have help, then I'd be grateful. Try and explain please. I'm just four weeks in this course and I don't know much about Python as a whole. I'm starting fresh I guess you can say.
Thanks in advance.
I'm trying to complete my workbook for university, but I'm stuck on this question: Write a program that determines how many of each coin ( from 1p to 50p) a vending machine should dispense for different amounts of change. You should print a row for each value of change between 0 and 99 and columns for the change required.
For example, the start of the table should look like the following:
The table should go up to 99p.
All I have is this code:
num1=0.01 num2=0.50 num3=float(input('Enter a number: '))I've made a multiplication table, but this seems different, and much more difficult.
If I can have help, then I'd be grateful. Try and explain please. I'm just four weeks in this course and I don't know much about Python as a whole. I'm starting fresh I guess you can say.
Thanks in advance.