Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 17 Online
OpenStudy (anonymous):

having some diffculties with problem2 paying debit....pls assist

OpenStudy (anonymous):

i get an syntax error, unexpected $end, expecting kEND . . . . . please what is wrong? #now set your utput to display results for amt paud and balance remainng print ('Total so far paid: ',round(paidsofar,2)) print ('Remaining balance: ',round(balance,2))

OpenStudy (anonymous):

Did you try: print ('Total so far paid: ' + str(round(paidsofar,2))) ?

OpenStudy (anonymous):

yes i did but still catching error

OpenStudy (anonymous):

Are you sure your fuction's identation is correct? Most of this kind of error I found were in Ruby, and it was about closing function by an "end". In Python, nothing like that... until your indentation is right. Did you check that?

OpenStudy (anonymous):

By the way, I would write the print command with the double quotes (at least, for Python 2.7.3 interpreter): print "Total paid so far: " + str(round(paidsofar,2)) print "Remaining balance: " + str(round(balance,2))

OpenStudy (microbot):

@mathieu_W he can do with single quotes aswell, no problem there. @fdarko check your messages i've responded your message on it:) hope it helps!

OpenStudy (anonymous):

Thanks all for the fantastic feedback.......the grade could not grade me afte submssion what might bethe issue?

OpenStudy (anonymous):

remember you dont have to include constants in the submission of the code. That is done for you.

OpenStudy (anonymous):

Stick to the specifications as close as possible.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!