Don't Repeat yourself


#1

Don’t know am I following the right instructions, please help me were I am going wrong


#2

Function name should be exactly same what the instruction wants.


#3

yep I have given same variable name as orange cost


#4

Your code is fine tog et a result, however the courses checking algorithms are specifically looking for the function ‘orangeCost’ and not ‘orangecost’ (note the capital ‘C’). So even though your code works, because the course can’t see the correct variable name - it just assumes you’ve done it wrong. And to be fair - following the naming system you’ve been asked to follow is good real world practice anyway.


#5

thank you so much mate, now its working fine


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.