0

Error in the Code coach

Please how does the system input values for the code coach challenges. I need to know so that i can get the questions irrespective of how they input values.

25th Jan 2020, 8:07 PM
Ifeanyi Kalu
Ifeanyi Kalu - avatar
6 Antworten
+ 2
please show us the code in question as to be able to help you...
25th Jan 2020, 8:17 PM
BroFar
BroFar - avatar
+ 1
x = int(input()) print(hover_gain(x))
25th Jan 2020, 8:23 PM
rodwynnejones
rodwynnejones - avatar
+ 1
Int(input()) did the magic. Thank Guys
25th Jan 2020, 10:17 PM
Ifeanyi Kalu
Ifeanyi Kalu - avatar
0
def hover_gain(n): cost_price = 2000000 * 10 + 1000000 sell_price = 3000000 * n gain = sell_price - cost_price if gain > 0: return 'Profit' elif gain < 0: return 'Loss' else: return 'Broke Even' x = hover_gain(5) print(x)
25th Jan 2020, 8:18 PM
Ifeanyi Kalu
Ifeanyi Kalu - avatar
0
What am i not doing to get the challenge right?
25th Jan 2020, 8:19 PM
Ifeanyi Kalu
Ifeanyi Kalu - avatar
0
Make use of "input()"
25th Jan 2020, 8:58 PM
Brian Gicharu
Brian Gicharu - avatar