Where is the problem with this code?


#1

hello every body
where is the problem here?

print "hello there"
print "but the days that you want to but your car there"
days = raw_input()
def rental_car_cost():
  cost = str(days) * 40
  if days >= 7:
    return cost - 50
  elif days >= 3:
    return cost - 20

#2

Which problem? From what I can tell the problem is not identifying the problem, so let's start there. Consider what happens differently from what you want and what information you're missing to continue. (You won't solve a problem that you don't know what it is.)


#3

Oh sorry i miss it cause i miss and press enter and miss to fix it
The problem is iam play my project
When i put and number to days
There ia no thing happened and no cost!
The fix include the replay on this replay
I dont know how to put best answer to
Replay-replay
Thanks for all


#4

2 posts were split to a new topic: Rental Car Cost


Rental Car Cost
#6

i was showing how to fix the problem he had by showing the code


#7

here type this code:
name=input ("enter your name:")
print ("hello,", name)
thats what i was showing him that base code
not the words that are there but how to fix it


#8

This is still going against the instructions. Please do not direct others to stray from the specified instructions. It does not help.


#9

how can cost be string(days) + 40 ? :stuck_out_tongue:
has to be "cost = days * 40"


#10

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