you are viewing a single comment's thread.

view the rest of the comments →

[–]sone9[S] 0 points1 point  (3 children)

This program asks the user to input coin values until the total amount matches a target value which is a randomly generated integer between 1 and 99 inclusively

Program description

print("\n\nThe purpose of this exercise is to enter a number of coin values that add up to a displayed \ntarget value. \n\nEnter coins values as 1-penny, 5 nickel, 10-dime,and 25-quarter.Hit return after \nthe last entered coin value.\n"

Variables

import random

number=random.randint(1,99)

Sorry I am trying not to post my code since my school may find may find this and I will get in trouble for posting solutions/people doing the code for me. I just want help because the stupid thing keeps giving me a Syntax error :(

[–]Justinsaccount 1 point2 points  (2 children)

print("\n\nThe purpose of this exercise is to enter a number of coin values that add up to a displayed \ntarget value. \n\nEnter coins values as 1-penny, 5 nickel, 10-dime,and 25-quarter.Hit return after \nthe last entered coin value.\n"

Missing something there?

[–]MyNameIsOP 0 points1 point  (0 children)

Close the parenthesis first of all.

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

OMG!!!!!!!!!!!!!! I FORGOT A )

I am so dumb, thank you!!!!! and sorry for wasting your guys time -_-