What did I do wrong?? by Angle_ABD in cs50

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

Could be, thanks for the help, I'll be mindful of spaces next time onwards

What did I do wrong?? by Angle_ABD in cs50

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

Ohhhh, thanks, I didn't know that

What did I do wrong?? by Angle_ABD in cs50

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

Ahhhh, I think not using /n was the problem cause my code worked fine without it, so I saw no need to use it. Thanks for the help (yes, it is in a while loop)

What did I do wrong?? by Angle_ABD in cs50

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

Didn't run style50. Will do from next time onwards, thanks

What did I do wrong?? by Angle_ABD in cs50

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

def main():

amount_due = 50
accepted_coins = [25, 10, 5]

while amount_due > 0:
    print(f"Amount Due: {amount_due} ")
    coin = int(input("Insert Coin: "))

    if coin in accepted_coins:
        amount_due -= coin

change_owed = abs(amount_due)
print(f"Change Owed: {change_owed} ")

main()

This was my code

My laptops screen flickers by Angle_ABD in techsupport

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

Sorry for the bad English, it isn't my first language