I need a little help from you guys.
Am playing with this exercise, trying to understand it better and i have come across an "error".
In the exercise Planning Your Trip, the task is to - Define a function called hotel_cost with one argument nights as input.The hotel costs $140 per night. So, the function hotel_cost should return 140 * nights.-
I have done that, but i wanted to make it so as to give it my input, and it looks like this.
nights = raw_input("How many nights are you staying?") def hotel_cost (nights): print 140 * nights return 140 * nights hotel_cost(nights)
The answer i received when i, for example typed in 2, is 2 printed 140 times. How can i code it to give me value of 280?
Thanks in advance!