+ 1
What's problem in this code?
houses = int(input()) bill = 1/3 #your code goes here a = 2 / houses *100 if a == int(a) : print(int(a)) else : b = a - int(a) if b >= 0.5 : print(int(a+1)) else : print(int(a)) Halloween candy from code couch
3 Antworten
0
What is your goal ?
0
But looks like you want to round up or down depending on whats nearer?
0
There is no problem indeed, but it seems the problem wants you to round up every number above .0, for example: from 19.1 to 20 or from 50.05 to 51